getPurchasedServerCost() Netscript Function

getPurchasedServerCost(ram)
RAM cost:

0.25 GB

Arguments:
  • ram (number) – 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:

Cost to purchase a server with the specified amount of ram.

Example:

getPurchasedServerCost(8192); // returns: 450560000