Hundreds of errors since latest patch
Grizz2202 opened this issue ยท 5 comments
I have 200+ errors of "254x Scrap/addons/main/sellPrices.lua:55: attempt to call global 'GetContainerItemInfo' (a nil value)" since i updated.
Did i do something wrong?
Getting errors with the sellPrices.lua as well
166x Interface\AddOns\Scrap\addons\main\sellPrices.lua:43: attempt to compare number with nil [string "@Interface\AddOns\Scrap\addons\main\sellPrices.lua"]:43: in function
AddLine'
[string "@interface\AddOns\Scrap\addons\main\sellPrices.lua"]:92: in function <Interface\AddOns\Scrap\addons\main\sellPrices.lua:91>
[string "=[C]"]: in function SetHyperlink' [string "@Interface\AddOns\FishingBuddy\Libs\LibFishing-1.0\LibFishing-1.0-101090.lua"]:1246: in function
GetPoleType'
[string "@interface\AddOns\FishingBuddy\Libs\LibFishing-1.0\LibFishing-1.0-101090.lua"]:1304: in function <...\FishingBuddy\Libs\LibFishing-1.0\LibFishing-1.0.lua:1295>
[string "=(tail call)"]: ?
[string "@interface\AddOns\FishingBuddy\FishingBuddy-0.8.3.lua"]:565: in function <Interface\AddOns\FishingBuddy\FishingBuddy.lua:561>
[string "@interface\AddOns\FishingBuddy\FishingBuddy-0.8.3.lua"]:1000: in function <Interface\AddOns\FishingBuddy\FishingBuddy.lua:999>
[string "@interface\AddOns\FishingBuddy\FishingBuddy-0.8.3.lua"]:1406: in function <Interface\AddOns\FishingBuddy\FishingBuddy.lua:1273>
Locals:
self =
SendSignal = defined @interface\AddOns\Scrap\libs\WildAddon-1.0\WildAddon-1.0.lua:82
OnMail = defined @interface\AddOns\Scrap\addons\main\sellPrices.lua:74
OnBag = defined @interface\AddOns\Scrap\addons\main\sellPrices.lua:54
RegisterMessage = defined @interface\AddOns\Bartender4\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:80
UnregisterMessage = defined @interface\AddOns\Bartender4\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:143
OnQuest = defined @interface\AddOns\Scrap\addons\main\sellPrices.lua:65
AddLine = defined @interface\AddOns\Scrap\addons\main\sellPrices.lua:40
OnSetCraftItem = defined @interface\AddOns\Scrap\addons\main\sellPrices.lua:87
SendMessage = defined @interface\AddOns\Bartender4\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:49
UnregisterSignal = defined @interface\AddOns\Scrap\libs\WildAddon-1.0\WildAddon-1.0.lua:78
RegisterEvent = defined @interface\AddOns\Bartender4\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:80
UnregisterAllMessages = defined @interface\AddOns\Bartender4\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:164
OnInventory = defined @interface\AddOns\Scrap\addons\main\sellPrices.lua:59
OnLink = defined @interface\AddOns\Scrap\addons\main\sellPrices.lua:91
OnSetTradeSkillItem = defined @interface\AddOns\Scrap\addons\main\sellPrices.lua:79
OnEnable = defined @interface\AddOns\Scrap\addons\main\sellPrices.lua:24
OnLoot = defined @interface\AddOns\Scrap\addons\main\sellPrices.lua:70
UnregisterAllEvents = defined @interface\AddOns\Bartender4\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:164
RegisterSignal = defined @interface\AddOns\Scrap\libs\WildAddon-1.0\WildAddon-1.0.lua:74
NewModule = defined @interface\AddOns\Scrap\libs\WildAddon-1.0\WildAddon-1.0.lua:68
UnregisterEvent = defined @interface\AddOns\Bartender4\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:143
Tag = "SCRAP_"
}
tip = FishLibTooltip {
SetBorderBlendMode = defined @interface\SharedXML\SharedTooltipTemplates.lua:203
NineSlice = {
}
0 =
updateTooltip = 0.200000
TooltipBackdropOnLoad = defined @interface\SharedXML\SharedTooltipTemplates.lua:172
TopOverlay = {
}
GetBackdropColor = defined @interface\SharedXML\SharedTooltipTemplates.lua:191
GetBackdropBorderColor = defined @interface\SharedXML\SharedTooltipTemplates.lua:199
needsReset = true
BottomOverlay = {
}
SetBackdropColor = defined @interface\SharedXML\SharedTooltipTemplates.lua:187
layoutType = "TooltipDefaultLayout"
SetBackdropBorderColor = defined @interface\SharedXML\SharedTooltipTemplates.lua:195
}
item = "item:6256"
count = nil
silent = nil
price = nil
(*temporary) = 11
(*temporary) = defined =[C]:-1
(*temporary) = "item:6256"
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to compare number with nil"
`
I have 200+ errors of "254x Scrap/addons/main/sellPrices.lua:55: attempt to call global 'GetContainerItemInfo' (a nil value)" since i updated.
Did i do something wrong?
no, you didn't, to fix it do the following
goto your file listed in the error (for your game version, either the retail or classic folder)
at the top of the file right under the if TooltipDataProcessor then return end
add the following local C = LibStub('C_Everywhere').Container
it should look like so
if TooltipDataProcessor then return end
local C = LibStub('C_Everywhere').Container
then goto the line 55 (now line 56) and replace
function Prices.OnBag(tip, bag, slot)
local _, count, _,_,_,_,_,_,_, id = GetContainerItemInfo(bag, slot)
Prices:AddLine(tip, id, count, true)
end
with the following
function Prices.OnBag(tip, bag, slot)
local info = C.GetContainerItemInfo(bag, slot)
local id = info.itemID
local count = info.stackCount
Prices:AddLine(tip, id, count, true)
end
save your file and /reload in game
Surround it with a "if then" clause than it looks better:
function Prices.OnBag(tip, bag, slot)
local info = C.GetContainerItemInfo(bag, slot)
if info then
local id = info.itemID
local count = info.stackCount
Prices:AddLine(tip, id, count, true)
end
end
What I found with my issue was that the function...
function Prices:AddLine(tip, item, count, silent)
if item and (not silent or not self.shopping) and Scrap.sets.prices and not tip:IsForbidden() then
local price = select(11, GetItemInfo(item))
if price > 0 then
tip.__hasPrice = true
tip:AddLine(GetCoinTextureString(price * (count or 1)), 1,1,1)
tip:Show()
end
end
end
was also picking up items without prices. I changed the if statement and it appears to have gotten rid of the error (Lines 41-50). Basically removed the > 0 part so it is validating whether the prices variable is valid or not instead of checking if it is a numeric value.
function Prices:AddLine(tip, item, count, silent)
if item and (not silent or not self.shopping) and Scrap.sets.prices and not tip:IsForbidden() then
local price = select(11, GetItemInfo(item))
if price then
tip.__hasPrice = true
tip:AddLine(GetCoinTextureString(price * (count or 1)), 1,1,1)
tip:Show()
end
end
end