bitburner-src/markdown/bitburner.hacknet.purchasenode.md

26 lines
829 B
Markdown
Raw Normal View History

2021-10-30 18:34:14 +02:00
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2021-10-30 21:46:34 +02:00
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Hacknet](./bitburner.hacknet.md) &gt; [purchaseNode](./bitburner.hacknet.purchasenode.md)
2021-10-30 18:34:14 +02:00
2021-10-30 21:46:34 +02:00
## Hacknet.purchaseNode() method
2021-10-30 18:34:14 +02:00
2021-10-30 21:46:34 +02:00
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).
2021-10-30 18:34:14 +02:00
If the player cannot afford to purchase a new Hacknet Node then the function will return -1.
<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
2021-10-30 21:46:34 +02:00
RAM cost: 0 GB
2021-10-30 18:34:14 +02:00