From dc4a85e591fd5a1fea2cf90959018505fb477531 Mon Sep 17 00:00:00 2001 From: catloversg <152669316+catloversg@users.noreply.github.com> Date: Sat, 27 Apr 2024 16:10:58 +0700 Subject: [PATCH] CORPORATION: Fix wrong error message in buyMaterial API (#1234) --- src/NetscriptFunctions/Corporation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NetscriptFunctions/Corporation.ts b/src/NetscriptFunctions/Corporation.ts index ed29006ab..f9a7e1965 100644 --- a/src/NetscriptFunctions/Corporation.ts +++ b/src/NetscriptFunctions/Corporation.ts @@ -353,7 +353,7 @@ export function NetscriptCorporation(): InternalAPI { const materialName = getEnumHelper("CorpMaterialName").nsGetMember(ctx, _materialName, "materialName"); const amt = helpers.number(ctx, "amt", _amt); if (amt < 0 || !Number.isFinite(amt)) - throw new Error("Invalid value for amount field! Must be numeric and greater than 0"); + throw new Error("Invalid value for amount field! Must be numeric and greater than or equal to 0"); const material = getMaterial(divisionName, cityName, materialName); BuyMaterial(division, material, amt); },