mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-22 01:03:01 +02:00
DOC: Improve ns.kill documentation (#365)
This commit is contained in:
@@ -740,7 +740,7 @@ export const ns: InternalAPI<NSFull> = {
|
||||
},
|
||||
kill:
|
||||
(ctx) =>
|
||||
(scriptID, hostname?, ...scriptArgs) => {
|
||||
(scriptID, hostname = ctx.workerScript.hostname, ...scriptArgs) => {
|
||||
const ident = helpers.scriptIdentifier(ctx, scriptID, hostname, scriptArgs);
|
||||
let res;
|
||||
const killByPid = typeof ident === "number";
|
||||
@@ -749,7 +749,7 @@ export const ns: InternalAPI<NSFull> = {
|
||||
res = killWorkerScript(ident);
|
||||
} else {
|
||||
// Kill by filename/hostname
|
||||
if (scriptID === undefined || hostname === undefined) {
|
||||
if (scriptID === undefined) {
|
||||
throw helpers.makeRuntimeErrorMsg(ctx, "Usage: kill(scriptname, server, [arg1], [arg2]...)");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user