make hostname2 argument of scp optional

This commit is contained in:
Cyn 2022-01-15 16:42:04 -05:00
parent 78fa85a24e
commit b179a6a53a

@ -1081,7 +1081,7 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
workerScript.log("exit", () => "Failed. This is a bug. Report to dev.");
}
},
scp: async function (scriptname: any, hostname1: any, hostname2: any): Promise<boolean> {
scp: async function (scriptname: any, hostname1: any, hostname2?: any): Promise<boolean> {
updateDynamicRam("scp", getRamCost(Player, "scp"));
if (arguments.length !== 2 && arguments.length !== 3) {
throw makeRuntimeErrorMsg("scp", "Takes 2 or 3 arguments");