From 07e0a369f30234d93060e19831f7d621c5baab0f Mon Sep 17 00:00:00 2001 From: OganM Date: Mon, 4 Apr 2022 21:44:18 -0700 Subject: [PATCH] error handling for empty expressions --- addons/dice_syntax/dice_syntax.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/dice_syntax/dice_syntax.gd b/addons/dice_syntax/dice_syntax.gd index 1d00612..525f552 100644 --- a/addons/dice_syntax/dice_syntax.gd +++ b/addons/dice_syntax/dice_syntax.gd @@ -38,7 +38,7 @@ static func dice_parser(dice:String)->Dictionary: test_out.append(1.0) expression.execute(test_out) - if expression.has_execute_failed(): + if expression.has_execute_failed() or expression.get_error_text() !='': error = true msg.append('Expression fails to execute')