mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-03 22:37:06 +02:00
NETSCRIPT: Added ns.corporation.getConstants, replacing many other corporation getter functions (#260)
This commit is contained in:
@@ -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`);
|
||||
|
||||
Reference in New Issue
Block a user