From b43608b72463e60353ef2c8976c7f8c0f38383a2 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Tue, 6 May 2025 23:04:20 +0200 Subject: [PATCH] Fix importing actionbars --- Actions.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Actions.lua b/Actions.lua index f55e1c7..678e763 100644 --- a/Actions.lua +++ b/Actions.lua @@ -407,6 +407,7 @@ function ParseAction(action) if not action or action == "" then return ret end action = strtrim(action) + ---@type string, string, string local slot, id, typeChar = string.match(action, "([^\\]+)\\([^\\]+)\\([^\\]+)") if not typeChar then print(string.format("Unknown action type '%s' for action '%s'", tostring(typeChar), FormatAction(ret))) @@ -418,10 +419,8 @@ function ParseAction(action) return ret end - slot = tonumber(slot) - id = tonumber(id) - - if not slot then + local slotNum = tonumber(slot) + if not slotNum then print(string.format("Unknown slot '%s' for action '%s'", tostring(slot), FormatAction(ret))) return ret end @@ -432,7 +431,7 @@ function ParseAction(action) end return { - slot = slot, + slot = slotNum, id = id, type = type, }