2019-03-02 19:08:54 -08:00
|
|
|
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)
|
2021-03-12 02:51:56 -05:00
|
|
|
:returns: Cost to purchase a server with the specified amount of ``ram``.
|
2019-03-02 19:08:54 -08:00
|
|
|
|
2021-03-12 02:51:56 -05:00
|
|
|
Example:
|
2019-03-02 19:08:54 -08:00
|
|
|
|
2021-03-12 02:51:56 -05:00
|
|
|
.. code-block:: javascript
|
2019-03-02 19:08:54 -08:00
|
|
|
|
2021-03-12 02:51:56 -05:00
|
|
|
getPurchasedServerCost(8192); // returns: 450560000
|