mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-18 21:53: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);
|
||||
setTimeout(() => {
|
||||
const scriptServer = GetServer(ctx.workerScript.hostname);
|
||||
if (scriptServer == null) {
|
||||
throw helpers.errorMessage(ctx, "Could not find server. This is a bug. Report to dev");
|
||||
if (scriptServer === null) {
|
||||
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);
|
||||
|
||||
helpers.log(ctx, () => `Will execute '${path}' in ${runOpts.spawnDelay} milliseconds`);
|
||||
|
Loading…
Reference in New Issue
Block a user