From 197081dd3ea2e6a3afd140cd3070262c7f657d5e Mon Sep 17 00:00:00 2001 From: MPJ / Quadryo <104721042+MPJ-K@users.noreply.github.com> Date: Fri, 26 Aug 2022 20:59:26 +0200 Subject: [PATCH] Fix #3963 Adds a previously missing `throw` to allow `bladeburner.setActionLevel()` to properly produce errors and prevent invalid action levels from being set. --- src/NetscriptFunctions/Bladeburner.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NetscriptFunctions/Bladeburner.ts b/src/NetscriptFunctions/Bladeburner.ts index efc5eaf23..6c400167f 100644 --- a/src/NetscriptFunctions/Bladeburner.ts +++ b/src/NetscriptFunctions/Bladeburner.ts @@ -250,7 +250,7 @@ export function NetscriptBladeburner(): InternalAPI { checkBladeburnerAccess(ctx); const action = getBladeburnerActionObject(ctx, type, name); if (level < 1 || level > action.maxLevel) { - helpers.makeRuntimeErrorMsg(ctx, `Level must be between 1 and ${action.maxLevel}, is ${level}`); + throw helpers.makeRuntimeErrorMsg(ctx, `Level must be between 1 and ${action.maxLevel}, is ${level}`); } action.level = level; },