Fix isRunning

This commit is contained in:
Olivier Gagnon 2022-03-30 14:11:21 -04:00
parent 8200b62384
commit 432c8dd206

@ -1709,9 +1709,7 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
const txtFile = getTextFile(filename, server);
return txtFile != null;
},
isRunning: function (_fn: unknown, _hostname: unknown = workerScript.hostname, ...scriptArgs: any[]): boolean {
const fn = helper.string("isRunning", "fn", _fn);
const hostname = helper.string("isRunning", "hostname", _hostname);
isRunning: function (fn: any, _hostname: any = workerScript.hostname, ...scriptArgs: any[]): boolean {
updateDynamicRam("isRunning", getRamCost(Player, "isRunning"));
if (fn === undefined || hostname === undefined) {
throw makeRuntimeErrorMsg("isRunning", "Usage: isRunning(scriptname, server, [arg1], [arg2]...)");