mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-21 16:52:55 +02:00
work on making the netscript api tighter
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [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!");
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user