bitburner-src/markdown/bitburner.hacknet.purchasenode.md
Olivier Gagnon 43fc5dfd48 work on doc
2021-10-30 12:34:14 -04:00

837 B
Raw Blame History

Home > bitburner > HackNet > purchaseNode

HackNet.purchaseNode() method

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.

Signature:

purchaseNode(): number;

Returns:

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

0 GB