LUA error after the last update
Nillx opened this issue ยท 8 comments
Got this error after the new update today.
2x XLoot_Group\Group-Group.lua:236: Usage: GetItemQualityColor(index)
[string "=[C]"]: in function `GetItemQualityColor'
[string "@XLoot_Group\Group-Group.lua"]:236: in function `?'
[string "@XLoot\XLoot-9.2.7-1.lua"]:39: in function <XLoot\XLoot.lua:37>
[string "=[C]"]: in function `ConfirmLootRoll'
[string "@Leatrix_Plus\Leatrix_Plus-3.0.06.alpha.5.lua"]:11820: in function <Leatrix_Plus\Leatrix_Plus.lua:11712>
[string "=[C]"]: ?
[string "@XLoot_Group\Group-Group.lua"]:743: in function <XLoot_Group\Group.lua:742>
Locals:
(*temporary) = nil
What version are you playing on?
When is this error occurring?
How are you installing the addon?
3.4.0, Curseforge app. It happened once so far, think while i was doing Onyxia 60lvl.
Was there a loot roll that you actually missed or did it just happen? (I believe the builtin history command is /loot)
Builtin LootFrame has a check that would avoid that error, but it would mean that junk roll events happen.
Try inserting these lines before line 235 (Before "local link = ")
if name == nil then
print('XLoot Group: Ignoring START_LOOT_ROLL with no name data')
return
end
Sorry. XLoot_Group/Group.lua line 235.
It should look like this:
function addon:START_LOOT_ROLL(id, length, uid, ongoing)
local icon, name, count, quality, bop, need, greed, de, reason_need, reason_greed, reason_de, de_skill = GetLootRollItemInfo(id)
if name == nil then
print('XLoot Group: Ignoring START_LOOT_ROLL with no name data')
return
end
local link = GetLootRollItemLink(id)
local r, g, b = GetItemQualityColor(quality)
Yes. It should print a message if it happens, but shouldn't error.
The question is why START_LOOT_ROLL is passing information about a roll that isn't.. valid.
If we just need to ignore it, this will work fine. You'll see the message ("ignoring START_.."). If you see this message, please check /loot to confirm didn't miss a valid roll.