2019-03-02 19:08:54 -08:00
|
|
|
getScriptRam() Netscript Function
|
2019-04-05 02:08:41 -07:00
|
|
|
=================================
|
2019-03-02 19:08:54 -08:00
|
|
|
|
2021-03-12 02:51:56 -05:00
|
|
|
.. js:function:: getScriptRam(filename[, hostname])
|
2019-03-02 19:08:54 -08:00
|
|
|
|
|
|
|
:RAM cost: 0.1 GB
|
2021-03-12 02:51:56 -05: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.
|
2019-03-02 19:08:54 -08:00
|
|
|
|
2021-03-12 02:51:56 -05:00
|
|
|
Example:
|
|
|
|
|
|
|
|
.. code-block:: javascript
|
|
|
|
|
|
|
|
getScriptRam("grow.script"); // returns: 1.75
|