mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-27 19:37:07 +02:00
[refactor] Moved 'printArray' to 'arrayToString' TS file
This commit is contained in:
@@ -16,7 +16,8 @@ import {Settings} from "./Settings";
|
||||
|
||||
import {parse} from "../utils/acorn";
|
||||
import {dialogBoxCreate} from "../utils/DialogBox";
|
||||
import {compareArrays, printArray} from "../utils/HelperFunctions";
|
||||
import {compareArrays} from "../utils/HelperFunctions";
|
||||
import {arrayToString} from "../utils/helpers/arrayToString";
|
||||
import {roundToTwo} from "../utils/helpers/roundToTwo";
|
||||
import {isString} from "../utils/StringHelperFunctions";
|
||||
|
||||
@@ -319,7 +320,7 @@ function runScriptsLoop() {
|
||||
|
||||
dialogBoxCreate("Script runtime error: <br>Server Ip: " + serverIp +
|
||||
"<br>Script name: " + scriptName +
|
||||
"<br>Args:" + printArray(w.args) + "<br>" + errorMsg);
|
||||
"<br>Args:" + arrayToString(w.args) + "<br>" + errorMsg);
|
||||
w.scriptRef.log("Script crashed with runtime error");
|
||||
} else {
|
||||
w.scriptRef.log("Script killed");
|
||||
@@ -379,7 +380,7 @@ function addWorkerScript(runningScriptObj, server) {
|
||||
var ramAvailable = server.maxRam - server.ramUsed;
|
||||
if (ramUsage > ramAvailable) {
|
||||
dialogBoxCreate("Not enough RAM to run script " + runningScriptObj.filename + " with args " +
|
||||
printArray(runningScriptObj.args) + ". This likely occurred because you re-loaded " +
|
||||
arrayToString(runningScriptObj.args) + ". This likely occurred because you re-loaded " +
|
||||
"the game and the script's RAM usage increased (either because of an update to the game or " +
|
||||
"your changes to the script.)");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user