diff --git a/src/Augmentation/AugmentationHelpers.tsx b/src/Augmentation/AugmentationHelpers.tsx index 915e01c33..27d19ab76 100644 --- a/src/Augmentation/AugmentationHelpers.tsx +++ b/src/Augmentation/AugmentationHelpers.tsx @@ -2050,7 +2050,7 @@ function initAugmentations(): void { info: "A brain implant carefully assembled around the synapses, which " + "micromanages the activity and levels of various neuroreceptor " + - "chemicals and modulates electrical acvitiy to optimize concentration, " + + "chemicals and modulates electrical activity to optimize concentration, " + "allowing the user to multitask much more effectively.", stats: ( <> diff --git a/src/NetscriptFunctions.ts b/src/NetscriptFunctions.ts index 799db37ca..ae6cd479e 100644 --- a/src/NetscriptFunctions.ts +++ b/src/NetscriptFunctions.ts @@ -524,7 +524,7 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS { if (isNaN(hackAmount)) { throw makeRuntimeErrorMsg( "hackAnalyzeThreads", - `Invalid growth argument passed into hackAnalyzeThreads: ${hackAmount}. Must be numeric.`, + `Invalid hackAmount argument passed into hackAnalyzeThreads: ${hackAmount}. Must be numeric.`, ); } @@ -1649,7 +1649,12 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS { const cost = getPurchaseServerCost(ram); if (cost === Infinity) { - workerScript.log("purchaseServer", () => `Invalid argument: ram='${ram}' must be a positive power of 2`); + if(ram > getPurchaseServerMaxRam()){ + workerScript.log("purchaseServer", () => `Invalid argument: ram='${ram}' must not be greater than getPurchaseServerMaxRam`); + }else{ + workerScript.log("purchaseServer", () => `Invalid argument: ram='${ram}' must be a positive power of 2`); + } + return ""; } diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index 065e569fc..ddbfaa4bd 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -4200,13 +4200,11 @@ export interface NS extends Singularity { * ```ts * // NS1: * var earnedMoney = hack("foodnstuff"); - * earnedMoney = earnedMoney + hack("foodnstuff", { threads: 5 }); // Only use 5 threads to hack * ``` * @example * ```ts * // NS2: * let earnedMoney = await ns.hack("foodnstuff"); - * earnedMoney += await ns.hack("foodnstuff", { threads: 5 }); // Only use 5 threads to hack * ``` * @param host - Hostname of the target server to hack. * @param opts - Optional parameters for configuring function behavior. @@ -4234,16 +4232,14 @@ export interface NS extends Singularity { * @example * ```ts * // NS1: - * var availableMoney = getServerMoneyAvailable("foodnstuff"); + * var currentMoney = getServerMoneyAvailable("foodnstuff"); * currentMoney = currentMoney * (1 + grow("foodnstuff")); - * currentMoney = currentMoney * (1 + grow("foodnstuff", { threads: 5 })); // Only use 5 threads to grow * ``` * @example * ```ts * // NS2: - * let availableMoney = ns.getServerMoneyAvailable("foodnstuff"); + * let currentMoney = ns.getServerMoneyAvailable("foodnstuff"); * currentMoney *= (1 + await ns.grow("foodnstuff")); - * currentMoney *= (1 + await ns.grow("foodnstuff", { threads: 5 })); // Only use 5 threads to grow * ``` * @param host - Hostname of the target server to grow. * @param opts - Optional parameters for configuring function behavior. @@ -4269,14 +4265,12 @@ export interface NS extends Singularity { * // NS1: * var currentSecurity = getServerSecurityLevel("foodnstuff"); * currentSecurity = currentSecurity - weaken("foodnstuff"); - * currentSecurity = currentSecurity - weaken("foodnstuff", { threads: 5 }); // Only use 5 threads to weaken * ``` * @example * ```ts * // NS2: * let currentSecurity = ns.getServerSecurityLevel("foodnstuff"); * currentSecurity -= await ns.weaken("foodnstuff"); - * currentSecurity -= await ns.weaken("foodnstuff", { threads: 5 }); // Only use 5 threads to weaken * ``` * @param host - Hostname of the target server to weaken. * @param opts - Optional parameters for configuring function behavior.