DJBags

DJBags

33k Downloads

Lua Error - Currency

EllsFox opened this issue ยท 1 comments

commented

Hovering over the currency section in the inventory is creating a lua error popup. Happens each time the cursor moves over the money. Replicated on two different characters, with and without other addons. Love this addon btw, its perfect for someone like me. Thanks for updating it.

Lua Error for Currency:
Message: [string "DJBagsBagMainBarCurrencyDisplay:OnEnter"]:1: attempt to call global 'GetCurrencyListSize' (a nil value)
Time: Tue Oct 20 23:55:53 2020
Count: 1
Stack: [string "DJBagsBagMainBarCurrencyDisplay:OnEnter"]:1: attempt to call global 'GetCurrencyListSize' (a nil value)
[string ":OnEnter"]:1: in function <[string ":OnEnter"]:1>

Locals: self = DJBagsBagMainBarCurrencyDisplay {
0 =
}
motion = true
(*temporary) = nil
(*temporary) = "attempt to call global 'GetCurrencyListSize' (a nil value)"

commented

I'm brand new to coding in Lua but for a temporary fix I updated Bag.xml with:

Line 167: local cnt = C_CurrencyInfo.GetCurrencyListSize()
and
Line 172: local name, _, _, _, _, count, texture, _, _, _, _ = C_CurrencyInfo.GetCurrencyListInfo(index)

to recognize the changes in the C_CurrencyInfo functions with the Shadowlands update. https://github.com/Stanzilla/WoWUIBugs/wiki/9.0.1-Consolidated-UI-Changes