work on making the netscript api tighter

This commit is contained in:
Olivier Gagnon
2021-11-03 20:19:52 -04:00
parent c5fb5155f3
commit 14150d3e33
270 changed files with 11011 additions and 1273 deletions
-41
View File
@@ -1,41 +0,0 @@
<!-- 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; [kill](./bitburner.ns.kill_1.md)
## NS.kill() method
Terminate another script.
<b>Signature:</b>
```typescript
kill(scriptPid: number): boolean;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| scriptPid | number | PID of the script to kill |
<b>Returns:</b>
boolean
True if the script is successfully killed, and false otherwise.
## Remarks
RAM cost: 0.5 GB
Kills the script with the specified PID. Killing a script by its PID will typically have better performance, especially if you have many scripts running. If this function successfully kills the specified script, then it will return true. Otherwise, it will return false.
## Example
```ts
if (kill(10)) {
print("Killed script with PID 10!");
}
```