bitburner-src/doc/source/netscript/basicfunctions/getServerMoneyAvailable.rst

20 lines
536 B
ReStructuredText
Raw Normal View History

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