From 049684e99eb210f79ab28cde7ecee493640ea2e7 Mon Sep 17 00:00:00 2001 From: Jrc13245 Date: Thu, 18 Dec 2025 22:10:22 -0500 Subject: [PATCH] fix multi comparison with multiple values --- Core.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Core.lua b/Core.lua index c9f8303..4246838 100644 --- a/Core.lua +++ b/Core.lua @@ -1739,8 +1739,9 @@ function CleveRoids.ParseMsg(msg) local hasAmpersand = string.find(args, "&") -- Detect if & is part of a multi-comparison pattern (e.g., >0&<10) - -- Pattern: operator+number followed by & followed by operator - local isMultiComparison = hasAmpersand and string.find(args, "[>~=<]+%d+[^%d]*&[^%d]*[>~=<]") + -- Pattern: operator+number followed by & (with optional whitespace) followed by operator + -- IMPORTANT: Only whitespace allowed around &, NOT letters (to distinguish from Rip>3&Rake>3) + local isMultiComparison = hasAmpersand and string.find(args, "[>~=<]+%d+%.?%d*%s*&%s*[>~=<]") local separator = "/" local operatorType = "OR" @@ -1791,7 +1792,8 @@ function CleveRoids.ParseMsg(msg) -- Detect if this conditional has multiple operators -- Example: "ap>1800/<2200" or "Recently_Bandaged>0&<10" or "health>50&<80" -- Works with ANY conditional that supports numeric operators - if string.find(processed_arg, "[>~=<]+%d+[^%d]+[>~=<]") then + -- Pattern: only whitespace or separators allowed between comparisons, NOT letters + if string.find(processed_arg, "[>~=<]+%d+%.?%d*%s*[/&]%s*[>~=<]") then -- This arg has multiple comparisons, parse them all local stat_name = name_to_use local comparisons = {}