mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 23:08:36 +02:00
Massive doc update
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
getPurchasedServerUpgradeCost() Netscript Function
|
||||
===========================================
|
||||
|
||||
.. js:function:: getPurchasedServerUpgradeCost(hostname, ram)
|
||||
|
||||
:RAM cost: 0.25 GB
|
||||
|
||||
:param string hostname: Hostname of target purchased server.
|
||||
:param number ram: Target amount of RAM for purchased server. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of :doc:`getPurchasedServerMaxRam<getPurchasedServerMaxRam>`
|
||||
:returns: Cost to purchase a server with the specified amount of ``ram``.
|
||||
|
||||
Giving any non-power-of-2 as an argument results in the function returning `-1`
|
||||
|
||||
Example:
|
||||
|
||||
.. code-block:: javascript
|
||||
ns.purchaseServer("smallServer",2) //costs 110000
|
||||
ns.getPurchasedServerUpgradeCost("smallServer",8); // returns: 330000
|
||||
Reference in New Issue
Block a user