fix function name in error for better trace

This commit is contained in:
phyzical 2022-02-13 17:10:11 +08:00
parent 9770853e29
commit 66ec3f4964

@ -1837,7 +1837,7 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
updateDynamicRam("tryWritePort", getRamCost(Player, "tryWritePort"));
if (typeof data !== "string" && typeof data !== "number") {
throw makeRuntimeErrorMsg(
"writePort",
"tryWritePort",
`Trying to write invalid data to a port: only strings and numbers are valid.`,
);
}