Titan Panel [Reagent Tracker]

Titan Panel [Reagent Tracker]

144k Downloads

Attempt to perform arithmetic on nil value

cliaz opened this issue ยท 1 comments

commented

User Nihlolino reports another instance of GetItemInfo() function returning a stack size of nil.
This obviously breaks code that relies on items stacking to real numbers.

Error occured in: Global
Count: 2
Message: ...ClassicReagentTracker\TitanClassicReagentTracker.lua line 474:
attempt to perform arithmetic on local 'desiredCountOfReagent' (a nil value)
Debug:
[string "@TitanClassicReagentTracker\TitanClassicReagentTracker.lua"]:474: BuyReagents()
[string "@TitanClassicReagentTracker\TitanClassicReagentTracker.lua"]:87:
...ClassicReagentTracker\TitanClassicReagentTracker.lua:80
Locals:
self = TitanPanelReagentTrackerButton {
0 = <userdata>
registry = <table> {
}
label = <unnamed> {
}
refreshReagents = false
RefreshReagents = <function> defined @Interface\AddOns\TitanClassicReagentTracker\TitanClassicReagentTracker.lua:159
BuyReagents = <function> defined @Interface\AddOns\TitanClassicReagentTracker\TitanClassicReagentTracker.lua:443
UpdateButton = <function> defined @Interface\AddOns\TitanClassicReagentTracker\TitanClassicReagentTracker.lua:193
}
shoppingCart = <table> {
}
tableIndex = 1
(for generator) = <function> defined =[C]:-1
(for state) = <table> {
1 = <table> {
}
2 = <table> {
}
3 = <table> {
}
4 = <table> {
}
5 = <table> {
}
6 = <table> {
}
7 = <table> {
}
8 = <table> {
}
9 = <table> {
}
}
(for control) = 1
index = 1
buff = <table> {
reagentIcon = 133944
reagentName = "Maple Seed"
spellIcon = 136080
}
totalCountOfReagent = 0
desiredCountOfReagent = nil
(*temporary) = true
(*temporary) = "ReagentTracker"
(*temporary) = "Reagent1OneStack"
(*temporary) = true
(*temporary) = "OneStack"
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to perform arithmetic on local 'desiredCountOfReagent' (a nil value)"
debug = false
possessed = <table> {
1 = <table> {
}
2 = <table> {
}
3 = <table> {
}
4 = <table> {
}
5 = <table> {
}
6 = <table> {
}
7 = <table> {
}
8 = <table> {
}
9 = <table> {
}
}
TITAN_REAGENTTRACKER_ID = "ReagentTracker"
_ = nil```
commented

PR #8 with fix for this approved, pushing to prod