mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-17 21:23:54 +01:00
812 B
812 B
NS.kill() method
Terminate the script with the provided PID.
Signature:
kill(pid: number): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
pid | number | The PID of the script to kill. |
Returns:
boolean
True if the script is successfully killed, and false otherwise.
Remarks
RAM cost: 0.5 GB
Kills the script with the provided PID. To instead kill a script using its filename, hostname, and args, see the other ns.kill entry.
Example
// kills the script with PID 20:
ns.kill(20);