NeedsFoodBadly

NeedsFoodBadly

2.1k Downloads

Error on first login

eTzmNcbkrng opened this issue ยท 1 comments

commented

Previously reported on Curse as a problem with a L6 Dwarf Rogue.
Getting the same error on all Horde and Alliance toons of all levels, but only on first login.

4x NeedsFoodBadly\main.lua:78: attempt to compare nil with number
NeedsFoodBadly\main.lua:78: in function <NeedsFoodBadly\main.lua:62>
NeedsFoodBadly\main.lua:94: in function <NeedsFoodBadly\main.lua:89>

Locals:
best = <table> {
 FOOD = <table> {
 }
 BUFF = <table> {
 }
 DRINK = <table> {
 }
}
playerlevel = 9
(for index) = 2
(for limit) = 4
(for step) = 1
bag = 2
(for index) = 6
(for limit) = 10
(for step) = 1
slot = 6
id = 3726
type = "BUFF"
rank = 3
itemcount = 13
itemlevel = nil
(*temporary) = 5
(*temporary) = <function> defined =[C]:-1
(*temporary) = 3726
(*temporary) = <function> defined =[C]:-1
(*temporary) = "attempt to compare nil with number"
Classify = <function> defined @NeedsFoodBadly\main.lua:30
CreateOrUpdateMacro = <function> defined @NeedsFoodBadly\main.lua:47
commented

I believe that the issue is that GetItemInfo is returning nil because there's an item that hasn't been cached yet. I read that GetItemInfo can return nil for items that haven't been encountered since the game was started, but I guess it's even more sensitive than that.

I'm working on an upgrade right now that should be ready in the next day or so. It isn't calling GetItemInfo at all, so it should not run into this issue.