NETSCRIPT: Added ns.corporation.getConstants, replacing many other corporation getter functions (#260)

This commit is contained in:
Mughur
2022-12-25 10:33:13 +02:00
committed by GitHub
parent 018053d79e
commit 556fe8dd33
17 changed files with 287 additions and 180 deletions
+3
View File
@@ -415,6 +415,9 @@ export function runScriptFromScript(
return 0;
}
//prevent leading / from causing a bug
if (scriptname.startsWith("/")) scriptname = scriptname.slice(1);
if (typeof scriptname !== "string" || !Array.isArray(args)) {
workerScript.log(caller, () => `Invalid arguments: scriptname='${scriptname} args='${args}'`);
console.error(`runScriptFromScript() failed due to invalid arguments`);