Groupie

Groupie

49k Downloads

Lua error: attempt to perform arithmetic on local 'iLevel' (a nil value)

empiricalbw opened this issue ยท 8 comments

commented

Got this Lua error the very first time I logged in after installing Groupie:

Message: Interface\AddOns\Groupie\Helpers.lua:732: attempt to perform arithmetic on local 'iLevel' (a nil value)
Time: Sat Nov 19 20:54:00 2022
Count: 1
Stack: Interface\AddOns\Groupie\Helpers.lua:732: attempt to perform arithmetic on local 'iLevel' (a nil value)
[string "@interface\AddOns\Groupie\Helpers.lua"]:732: in function MyILVL' [string "@Interface\AddOns\Groupie\Core.lua"]:3080: in function UpdateCharacterSheet'
[string "@interface\AddOns\Groupie\Core.lua"]:3119: in function <Interface\AddOns\Groupie\Core.lua:3116>

Locals: iLevelSum = 0
(for index) = 1
(for limit) = 19
(for step) = 1
slotNum = 1
tempItemLink = "[]"
name = nil
_ = nil
_ = nil
iLevel = nil
_ = nil
_ = nil
_ = nil
_ = nil
itemType = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to perform arithmetic on local 'iLevel' (a nil value)"

commented

For reference, I looked at the source code and see that it is doing GetInventoryItemLink("player", 1). When I do a /dump for that from the console I get:
Screen Shot 2022-11-19 at 8 58 55 PM

commented

I then dumped the item link as well:

Screen Shot 2022-11-19 at 8 59 30 PM

commented

So there is definitely a 200 iLevel in there; I think Groupie just queried it all too early at login when stuff hadn't necessarily loaded yet. It's strange that tempItemLink was "[]" and not nil though.

commented

This was with Groupie 1.63 which I just installed from CurseForge.

commented

At least, in the .toc file it says 1.63 but on the Hola Amigo window that is still up on my client it says 1.61 at the top, so maybe the welcome screen is out of date too!

commented

Hey @empiricalbw ,

Are you running TacoTip as well?

commented

Tacotip cant be the problem here, if he was that function would never get called. Likely just need another nil check (for some reason). Interesting that sometimes the link can be non nil while every other value is lol

commented

Is this a persistent issue, or did it only happen the one time @empiricalbw