Merge pull request #3115 from ApamNapat/remove_unreachable_code

Removed unreachable code
This commit is contained in:
hydroflame
2022-03-20 21:46:23 -04:00
committed by GitHub
6 changed files with 70 additions and 96 deletions
+10 -12
View File
@@ -739,19 +739,17 @@ export function runScriptFromScript(
`Cannot run script '${scriptname}' (t=${threads}) on '${server.hostname}' because there is not enough available RAM!`,
);
return 0;
} else {
// Able to run script
workerScript.log(
caller,
() => `'${scriptname}' on '${server.hostname}' with ${threads} threads and args: ${arrayToString(args)}.`,
);
const runningScriptObj = new RunningScript(script, args);
runningScriptObj.threads = threads;
runningScriptObj.server = server.hostname;
return startWorkerScript(player, runningScriptObj, server, workerScript);
}
break;
// Able to run script
workerScript.log(
caller,
() => `'${scriptname}' on '${server.hostname}' with ${threads} threads and args: ${arrayToString(args)}.`,
);
const runningScriptObj = new RunningScript(script, args);
runningScriptObj.threads = threads;
runningScriptObj.server = server.hostname;
return startWorkerScript(player, runningScriptObj, server, workerScript);
}
workerScript.log(caller, () => `Could not find script '${scriptname}' on '${server.hostname}'`);