2019-03-02 19:08:54 -08:00
|
|
|
getServerMoneyAvailable() Netscript Function
|
|
|
|
============================================
|
|
|
|
|
2021-03-12 02:51:56 -05:00
|
|
|
.. js:function:: getServerMoneyAvailable(hostname)
|
2019-03-02 19:08:54 -08:00
|
|
|
|
|
|
|
:RAM cost: 0.1 GB
|
2021-03-12 02:51:56 -05:00
|
|
|
:param string hostname: Hostname of target server.
|
|
|
|
:returns: Money available on that server.
|
2019-03-02 19:08:54 -08:00
|
|
|
|
2021-03-12 02:51:56 -05:00
|
|
|
.. note::
|
2019-03-02 19:08:54 -08:00
|
|
|
|
2021-03-12 02:51:56 -05:00
|
|
|
Running this function on the home computer will return the player's money.
|
2019-03-02 19:08:54 -08:00
|
|
|
|
2021-03-12 02:51:56 -05:00
|
|
|
Example:
|
|
|
|
|
|
|
|
.. code-block:: javascript
|
|
|
|
|
|
|
|
getServerMoneyAvailable("foodnstuff"); // returns: 120000
|
2021-07-02 14:27:59 -07:00
|
|
|
getServerMoneyAvailable("home"); // returns: 1000
|