From 9cb476e1ed2c2158e76f19d40e06350178380dbf Mon Sep 17 00:00:00 2001 From: raeleus Date: Thu, 10 Oct 2024 21:47:03 -0700 Subject: [PATCH] Fix crash when using #try without parameters. --- Input.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Input.js b/Input.js index de877f4..697666a 100644 --- a/Input.js +++ b/Input.js @@ -1356,6 +1356,11 @@ function doCheck(command) { } function doTry(command) { + if (getArguments(command).length <= 1) { + state.show = "none" + return "\n[Error: Not enough parameters. See #help]\n" + } + const advantageNames = ["normal", "advantage", "disadvantage"] const difficultyNames = ["impossible", "extreme", "hard", "medium", "easy", "effortless", "automatic"] const difficultyScores = [30, 25, 20, 15, 10, 5, 0]