bitburner-src/markdown/bitburner.ns.getscriptram.md
2022-05-24 08:12:49 -04:00

984 B

Home > bitburner > NS > getScriptRam

NS.getScriptRam() method

Get the ram cost of a script.

Signature:

getScriptRam(script: string, host?: string): number;

Parameters

Parameter Type Description
script string Filename of script. This is case-sensitive.
host string Host of target server the script is located on. This is optional, if it is not specified then the function will use the current server as the target server.

Returns:

number

Amount of RAM (in GB) required to run the specified script on the target server, and 0 if the script does not exist.

Remarks

RAM cost: 0.1 GB

Returns the amount of RAM required to run the specified script on the target server. Returns 0 if the script does not exist.