XLoot

XLoot

5M Downloads

LUA error after the last update

Nillx opened this issue ยท 8 comments

commented

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
commented

What version are you playing on?

When is this error occurring?

How are you installing the addon?

commented

3.4.0, Curseforge app. It happened once so far, think while i was doing Onyxia 60lvl.

commented

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
commented

It just happened. Where exactly do i insert this?

commented

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)
commented

Done. Now i wait for it to happen again or?

commented

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.

commented

Okey ill let you know if it happen again.