Gogo1951 / Groupie

A better LFG tool for Classic WoW.
MIT License
2 stars 3 forks source link

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

Closed empiricalbw closed 1 year ago

empiricalbw commented 1 year ago

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 functionUpdateCharacterSheet' [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)"

empiricalbw commented 1 year ago

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
empiricalbw commented 1 year ago

I then dumped the item link as well:

Screen Shot 2022-11-19 at 8 59 30 PM
empiricalbw commented 1 year ago

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.

empiricalbw commented 1 year ago

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

empiricalbw commented 1 year ago

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!

Gogo1951 commented 1 year ago

Hey @empiricalbw ,

Are you running TacoTip as well?

TannerShmoog commented 1 year ago

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

TannerShmoog commented 1 year ago

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