Currency LUA ERROR
marulol opened this issue · 1 comments
Which software were you running?
- Addon version name:
- Client used: [e.g. Vanilla 1.14.4, Retail PTR x.x.x, etc]
Have you read the changelog?
Mark if read.
Please describe the bug.
A clear and concise description of what the bug is.
Just opening the bank produces this error.
Please describe how to reproduce it.
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Any Screenshots?
If applicable, please add screenshots to help explain your problem.
Error Logs are Important!
Type /console scriptErrors 1
in the chat and reload the game. If an error window appears when reproducing the bug, please write here the first message (labelled 1/Many) that appeared.
10x BagBrother/core/classes/currency.lua:22: bad argument #2 to 'format' (string expected, got nil)
[string "=[C]"]: in function format' [string "@BagBrother/core/classes/currency.lua"]:22: in function
Set'
[string "@BagBrother/core/classes/currencyTracker.lua"]:79: in function AddButton' [string "@BagBrother/core/classes/currencyTracker.lua"]:66: in function
Layout'
[string "@BagBrother/core/classes/currencyTracker.lua"]:37: in function RegisterEvents' [string "@BagBrother/core/classes/currencyTracker.lua"]:23: in function <...eBagBrother/core/classes/currencyTracker.lua:18> [string "=(tail call)"]: ? [string "@Bagnon/src/frame.lua"]:308: in function
PlaceCurrencies'
[string "@Bagnon/src/frame.lua"]:93: in function Layout' [string "@Bagnon/src/frame.lua"]:62: in function
Update'
[string "@Bagnon/src/frame.lua"]:52: in function RegisterSignals' [string "@BagBrother/core/classes/frameBase.lua"]:22: in function <BagBrother/core/classes/frameBase.lua:20> [string "=[C]"]: in function
Show'
[string "@BagBrother/core/api/frames.lua"]:32: in function `Show'
[string "@BagBrother/core/features/autoDisplay.lua"]:61: in function <...faceBagBrother/core/features/autoDisplay.lua:60>
Locals:
(*temporary) = "%s|T%s:14:14:2:0%s|t "
(*temporary) = nil
(*temporary) = 135947
(*temporary) = ""
(*temporary) = "string expected, got nil"
Solution:
BagBrother/core/classes/currency.lua in line 22 change:
self:SetText(format('%s|T%s:14:14:2:0%s|t ', data.quantity, data.iconFileID, data.iconArgs or ''))
to:
self:SetText(format('%s|T%s:14:14:2:0%s|t ', data.quantity or 0, data.iconFileID or 0, data.iconArgs or ''))
In also solves errors when displaying bank contents via inventory