
Bag no open for Classic
Closed this issue ยท 19 comments
Is there an existing issue for this?
- I have searched the existing open and closed issues.
Description
There was a new WoW Classic update and when I logged into the game, when I tried to look at the inventory nothing appeared. I got the BugSack error.
Edit: There was a comment, in BagBrother>Core>playerMoney.lua that removing the line:
f.info = MoneyTypeInfo[f.Type]
And yes, it worked.
Bagnon Version
Bagnon 11.1.9
World of Warcraft Flavor
Classic Era
World of Warcraft Region
EU
Tested with only Bagnon
I got this issue with only Bagnon enabled
Lua Error
BugSack:
4x ...rfaceBagBrother/core/classes/playerMoney.lua:48: attempt to index global 'MoneyTypeInfo' (a nil value)
[BagBrother/core/classes/playerMoney.lua]:48: in function 'Construct'
[BagBrother/libs/Poncho-2.0-5/Poncho-2.0.lua]:81: in function <...aceBagBrother/libs/Poncho-2.0/Poncho-2.0.lua:75>
[tail call]: ?
[BagBrother/core/classes/parented.lua]:10: in function <BagBrother/core/classes/parented.lua:9>
[tail call]: ?
[BagBrother/core/classes/playerMoney.lua]:26: in function <...rfaceBagBrother/core/classes/playerMoney.lua:25>
[tail call]: ?
[BagBrother/core/classes/frameBase.lua]:125: in function 'GetWidget'
[Bagnon/src/frame.lua]:251: in function <Bagnon/src/frame.lua:248>
[tail call]: ?
[Bagnon/src/frame.lua]:54: in function 'Layout'
[BagBrother/core/classes/frameBase.lua]:58: in function 'Update'
[BagBrother/core/classes/frameBase.lua]:32: in function <BagBrother/core/classes/frameBase.lua:24>
[tail call]: ?
[BagBrother/frames/inventory/inventory.lua]:27: in function <...aceBagBrother/frames/inventory/inventory.lua:26>
[C]: in function 'Show'
[BagBrother/core/api/frames.lua]:32: in function 'Show'
[BagBrother/core/api/frames.lua]:24: in function <BagBrother/core/api/frames.lua:23>
[tail call]: ?
[tail call]: ?
[BagBrother/core/features/autoDisplay.lua]:83: in function 'ToggleBackpack'
[TOGGLEBACKPACK]:1: in function <[string "TOGGLEBACKPACK"]:1>
Locals:
self = <table> {
__super = <table> {
}
__base = <table> {
}
__index = <table> {
}
__name = "BagnonPlayerMoney"
Type = "PLAYER"
__frames = <table> {
}
__type = "Button"
__count = 1
__template = "SmallMoneyFrameTemplate"
Gray = "|cff999999%s|r"
}
f = BagnonPlayerMoney1 {
GoldButton = BagnonPlayerMoney1GoldButton {
}
vadjust = 0
trialErrorButton = BagnonPlayerMoney1TrialErrorButton {
}
CopperButton = BagnonPlayerMoney1CopperButton {
}
moneyType = "PLAYER"
moneyWidth = 112.148151
info = <table> {
}
staticMoney = 105063
SilverButton = BagnonPlayerMoney1SilverButton {
}
small = 1
}
overlay = Button {
}
(*temporary) = nil
(*temporary) = "PLAYER"
(*temporary) = "anyUp"
(*temporary) = "attempt to index global 'MoneyTypeInfo' (a nil value)"
Money = <table> {
__super = <table> {
}
__base = <table> {
}
__index = <table> {
}
__name = "BagnonPlayerMoney"
Type = "PLAYER"
__frames = <table> {
}
__type = "Button"
__count = 1
__template = "SmallMoneyFrameTemplate"
Gray = "|cff999999%s|r"
}
Reproduction Steps
- Press "B" or click the inventory.
- The error appears and the inventory is not visible.
Last Working Version
No response
Screenshots
No response
Here is the solution
Replace in [BagBrother/core/classes/playerMoney.lua]:48:
f.info = MoneyTypeInfo[f.Type]
with
f.info = (MoneyTypeInfo and MoneyTypeInfo[f.Type]) or { UpdateFunc = function(self) return self:GetMoney() end }
Sooooo, I'm gathering from this that the addon is useless until they fix it for Classic?
Any suggestions for alternatives?
The second option, { UpdateFunc = function(self) return self:GetMoney() end }
worked for me. First option worked but gave an error saying that MoneyType was not selected or something similar.
Sadly both don't work for me :(
Here they wrote #2042 (comment), which helps, a complete reinstallation, the latest version and making changes.
This fixes the issue in Cataclysm:
The second option, { UpdateFunc = function(self) return self:GetMoney() end } worked for me. First option worked but gave an error saying that MoneyType was not selected or something similar.
Same for me. Error with the 1st solution, but success with the second. :)
How do you go about changing the code to fix Bagnon, step by step please, I am not a computer wiz. I'm playing Classic Cata.
This fixes the issue in Cataclysm:
At least for me, this fixed nothing.
Here is the solution
Replace in [BagBrother/core/classes/playerMoney.lua]:48:
f.info = MoneyTypeInfo[f.Type]
withf.info = (MoneyTypeInfo and MoneyTypeInfo[f.Type]) or { UpdateFunc = function(self) return self:GetMoney() end }
I added this and it did not work for me.
Here is the solution
Replace in [BagBrother/core/classes/playerMoney.lua]:48:
f.info = MoneyTypeInfo[f.Type]
with
f.info = (MoneyTypeInfo and MoneyTypeInfo[f.Type]) or { UpdateFunc = function(self) return self:GetMoney() end }
Can confirm that this works in Classic
How do you go about changing the code to fix Bagnon, step by step please, I am not a computer wiz. I'm playing Classic Cata.
I play Classic, not Cata Classic and I'll just assume the file structure is the same:
- Go to your WoW Addons directory (installation dir -> interface -> addons)
- Go to BagBrother -> core -> classes directory
- Open the playerMoney.lua file, you can do it with notepad if you don't have a code editor.
- Go to line 48, it'll say
f.info = MoneyTypeInfo[f.Type]
. If you're in Notepad and don't see line numbers you can pressctrl + f
and paste the line in the search popup. - Replace that line with
f.info = (MoneyTypeInfo and MoneyTypeInfo[f.Type]) or { UpdateFunc = function(self) return self:GetMoney() end }
(note that the "or" in that line and what follows has to be included, it's not one or the other) - Save the file & restart the game or /reload
That fixed things for me, but there's an in-game solution if there are still issues which unfortunately makes player gold not display:
Options -> Addons -> Bagnon -> Frame settings -> uncheck Money -> change Frame to Bank and to the same (otherwise bank bags will not open). After that type /reload or restart the game.
It's interesting that Gigusx's excellent step-by-step says to include the entire line. When I tried replacing the original code with the entire line, nothing happened. So, I thought maybe the "or" meant to use one segment of code or the other. I know you coders may be snickering at me for thinking this but when I pasted only { UpdateFunc = function(self) return self:GetMoney() end } into the file, it worked perfectly.
Any thoughts as to why? I've also heard that disabling MoneyType in the settings restores function.
It's interesting that Gigusx's excellent step-by-step says to include the entire line. When I tried replacing the original code with the entire line, nothing happened. So, I thought maybe the "or" meant to use one segment of code or the other. I know you coders may be snickering at me for thinking this but when I pasted only { UpdateFunc = function(self) return self:GetMoney() end } into the file, it worked perfectly.
Any thoughts as to why? I've also heard that disabling MoneyType in the settings restores function.
It's the entire line, if it can't find the first part then it falls back to the second option.
Here is the solution
Replace in [BagBrother/core/classes/playerMoney.lua]:48:
f.info = MoneyTypeInfo[f.Type]
withf.info = (MoneyTypeInfo and MoneyTypeInfo[f.Type]) or { UpdateFunc = function(self) return self:GetMoney() end }
Perfect for Classic... Goood Job
If you are not familiar with changing the lua code. I've made a quick fix through WeakAura, you can download from https://wago.io/gQijcjxgA.
Importing this WA will fix the addon.