mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-19 06:03:50 +01:00
MISC: Change error message when spawning on an invalid server (#1370)
This commit is contained in:
parent
16b9ad21ea
commit
70383d9085
@ -737,11 +737,11 @@ export const ns: InternalAPI<NSFull> = {
|
|||||||
const args = helpers.scriptArgs(ctx, _args);
|
const args = helpers.scriptArgs(ctx, _args);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const scriptServer = GetServer(ctx.workerScript.hostname);
|
const scriptServer = GetServer(ctx.workerScript.hostname);
|
||||||
if (scriptServer == null) {
|
if (scriptServer === null) {
|
||||||
throw helpers.errorMessage(ctx, "Could not find server. This is a bug. Report to dev");
|
throw helpers.errorMessage(ctx, `Cannot find server ${ctx.workerScript.hostname}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return runScriptFromScript("spawn", scriptServer, path, args, ctx.workerScript, runOpts);
|
runScriptFromScript("spawn", scriptServer, path, args, ctx.workerScript, runOpts);
|
||||||
}, runOpts.spawnDelay);
|
}, runOpts.spawnDelay);
|
||||||
|
|
||||||
helpers.log(ctx, () => `Will execute '${path}' in ${runOpts.spawnDelay} milliseconds`);
|
helpers.log(ctx, () => `Will execute '${path}' in ${runOpts.spawnDelay} milliseconds`);
|
||||||
|
Loading…
Reference in New Issue
Block a user