bitburner-src/markdown/bitburner.ns.getscriptram.md
Snarling 65cd14e33b
DOC: Add ns documentation for possible sleeve tasks (#217)
* Add specific types for sleeve tasks
* Moved LocationName enum to overall enums file
* Add LocationName enum to those provided to player
* remove trailing s on CompanyPosNames enum (now CompanyPosName, in line with LocationName)
* Also regenerated all ns documentation. This leads to an expected error when checking for generated files, because PRs should not normally touch markdown files. Also leads to a lint failure in generated file bitburner.d.ts
* also removed some exporting from NetscriptDefinitions.d.ts for anything that wasn't imported somewhere else.
2022-11-20 12:07:22 -05:00

34 lines
988 B
Markdown

<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [NS](./bitburner.ns.md) &gt; [getScriptRam](./bitburner.ns.getscriptram.md)
## NS.getScriptRam() method
Get the ram cost of a script.
<b>Signature:</b>
```typescript
getScriptRam(script: string, host?: string): number;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| script | string | Filename of script. This is case-sensitive. |
| host | string | Hostname 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. |
<b>Returns:</b>
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.