Re-adjusted some stock market parameters. Improved Resleeving UI by allowing sort. Rebalanced Resleeve price. 0 is now a valid argument for number of threads when running scripts

This commit is contained in:
danielyxie
2019-01-28 16:17:04 -08:00
parent 8d2c007bcb
commit d54f0906f0
9 changed files with 325 additions and 83 deletions
+3 -3
View File
@@ -821,7 +821,7 @@ function NetscriptFunctions(workerScript) {
if (scriptname === undefined) {
throw makeRuntimeRejectMsg(workerScript, "run() call has incorrect number of arguments. Usage: run(scriptname, [numThreads], [arg1], [arg2]...)");
}
if (isNaN(threads) || threads < 1) {
if (isNaN(threads) || threads < 0) {
throw makeRuntimeRejectMsg(workerScript, "Invalid argument for thread count passed into run(). Must be numeric and greater than 0");
}
var argsForNewScript = [];
@@ -843,7 +843,7 @@ function NetscriptFunctions(workerScript) {
if (scriptname === undefined || ip === undefined) {
throw makeRuntimeRejectMsg(workerScript, "exec() call has incorrect number of arguments. Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)");
}
if (isNaN(threads) || threads < 1) {
if (isNaN(threads) || threads < 0) {
throw makeRuntimeRejectMsg(workerScript, "Invalid argument for thread count passed into exec(). Must be numeric and greater than 0");
}
var argsForNewScript = [];
@@ -868,7 +868,7 @@ function NetscriptFunctions(workerScript) {
if (scriptname === undefined) {
throw makeRuntimeRejectMsg(workerScript, "spawn() call has incorrect number of arguments. Usage: spawn(scriptname, numThreads, [arg1], [arg2]...)");
}
if (isNaN(threads) || threads < 1) {
if (isNaN(threads) || threads < 0) {
throw makeRuntimeRejectMsg(workerScript, "Invalid argument for thread count passed into run(). Must be numeric and greater than 0");
}
var argsForNewScript = [];