mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-18 07:18:38 +02:00
v0.44.1 Minor Update - Added Augs to Duplicate Sleeves and updated documentation
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
getPurchasedServerCost() Netscript Function
|
||||
===========================================
|
||||
|
||||
.. js:function:: getPurchasedServerCost(ram)
|
||||
|
||||
:RAM cost: 0.25 GB
|
||||
|
||||
:param number ram: Amount of RAM of a potential purchased server. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of 1048576 (2^20)
|
||||
|
||||
Returns the cost to purchase a server with the specified amount of *ram*.
|
||||
|
||||
Examples::
|
||||
|
||||
for (i = 1; i <= 20; i++) {
|
||||
tprint(i + " -- " + getPurchasedServerCost(Math.pow(2, i)));
|
||||
}
|
||||
Reference in New Issue
Block a user