bitburner-src/markdown/bitburner.hacknet.purchasenode.md
Olivier Gagnon 2b79871c02 doc
2021-11-03 00:27:21 -04:00

28 lines
859 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Hacknet](./bitburner.hacknet.md) &gt; [purchaseNode](./bitburner.hacknet.purchasenode.md)
## Hacknet.purchaseNode() method
Purchase a new hacknet node.
<b>Signature:</b>
```typescript
purchaseNode(): number;
```
<b>Returns:</b>
number
The index of the Hacknet Node or if the player cannot afford to purchase a new Hacknet Node the function will return -1.
## Remarks
RAM cost: 0 GB
Purchases a new Hacknet Node. Returns a number with the index of the Hacknet Node. This index is equivalent to the number at the end of the Hacknet Nodes name (e.g The Hacknet Node named `hacknet-node-4` will have an index of 4).
If the player cannot afford to purchase a new Hacknet Node then the function will return -1.