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

17 lines
528 B
ReStructuredText
Raw Normal View History

getScriptRam() Netscript Function
=================================
.. js:function:: getScriptRam(filename[, hostname = current hostname])
:RAM cost: 0.1 GB
2021-03-12 08:51:56 +01:00
:param string filename: Filename of script.
:param string hostname: Hostname of target server the script is located on.
Default to the server this script is running on.
:returns: Amount of RAM required to run the script, 0 if it does not exist.
2021-03-12 08:51:56 +01:00
Example:
.. code-block:: javascript
2023-01-06 13:43:09 +01:00
ns.getScriptRam("grow.js"); // returns: 1.75