From 984a15ec683dfdb2eb41fa83df8e94e367096589 Mon Sep 17 00:00:00 2001 From: Alex Folland Date: Thu, 25 Jul 2024 09:33:24 -0700 Subject: [PATCH] replace invalid and incorrect error message with valid and correct error message when queued equip action is broken --- AutoGear.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/AutoGear.lua b/AutoGear.lua index 68105ad..ae3997d 100644 --- a/AutoGear.lua +++ b/AutoGear.lua @@ -4676,9 +4676,11 @@ function AutoGearMain() and curAction.info and curAction.info.item and curAction.info.item.GetItemLocation and curAction.info.item:HasItemLocation() then local itemLocation = curAction.info.item:GetItemLocation() curAction.container, curAction.slot = itemLocation:GetBagAndSlot() - else - AutoGearPrint("Error: AutoGearActionQueue current action has either no container or no slot!", 3) - -- table.remove(AutoGearActionQueue, i) + end + if (not curAction.container) or (not curAction.slot) then + AutoGearBrokenAction = curAction + AutoGearPrint("Error: The current equip action has either no container or no slot! This should never happen, so it must be a bug. It's now been saved to global variable AutoGearBrokenAction, so try \"/dump AutoGearBrokenAction\" and send the output to the AutoGear author.",0) + table.remove(AutoGearActionQueue, i) end PickupContainerItem(curAction.container, curAction.slot) EquipCursorItem(curAction.replaceSlot)