Centias / BankItems

Keep track of you inventory, bank, reagant bank, void storage and more across all your characters. Fork of the original BankItems on Curse/WowAce. Credit to XinHuan/Burstroc and anyone else who worked on the original.
26 stars 2 forks source link

Errors with icons (itemInfo) #27

Closed Zelyana closed 8 months ago

Zelyana commented 8 months ago

Hi, I'm getting this error:

16x Usage: local icon = C_Item.GetItemIconByID(itemInfo)

[string "@BankItems/BankItems.lua"]:693: in function <BankItems/BankItems.lua:410> string "=[C]": in function Click' [string "@BankItems/BankItems.lua"]:4497: in functionBankItems_OpenBagsByBehavior' [string "@BankItems/BankItems.lua"]:3588: in function `BankItems_SlashHandler' [string "@BankItems/BankItems.lua"]:7705: in function <BankItems/BankItems.lua:7704>

Locals: (*temporary) = "Usage: local icon = C_Item.GetItemIconByID(itemInfo)"

Thanks

lqnrd commented 8 months ago

I fixed it for myself by changing the offending line 693 in BankItems.lua from this

_G[name.."Portrait"]:SetTexture(GetItemIcon(theBag.link) or theBag.icon)

to this

_G[name.."Portrait"]:SetTexture(theBag.icon or GetItemIcon(theBag.link))

I don't know if this breaks anything else, so I will leave it to the author to use this or fix it another way.

Zelyana commented 8 months ago

Thanks a lot, no error now.

Centias commented 8 months ago

Looks like there were some changes to GetItemIcon in 10.2.6 and it was causing errors in a few places, I just hadn't tried to opened the windows where they happened. I pushed out an update to fix all the ones I found.