
Lua Error
Closed this issue · 13 comments
Is there an existing issue for this?
- I have searched the existing open and closed issues.
Description
i hve two diffrent lua erros. i logged into the game, pagle, ally. on my paladin. bagon wouldnt open with my normal button to open. so i clicked on my bags. both attempt to open gave me lua errors.
Bagnon Version
Bagon-11.1.9.zip
World of Warcraft Flavor
Cataclysm Classic
World of Warcraft Region
US/NA
Tested with only Bagnon
I got this issue with only Bagnon enabled
Lua Error
Message: ...rface/AddOns/BagBrother/core/classes/playerMoney.lua:48: attempt to index global 'MoneyTypeInfo' (a nil value)
Time: Tue Apr 8 22:03:38 2025
Count: 1
Stack: ...rface/AddOns/BagBrother/core/classes/playerMoney.lua:48: attempt to index global 'MoneyTypeInfo' (a nil value)
[string "=[C]"]: ?
[string "@Interface/AddOns/BagBrother/core/classes/playerMoney.lua"]:48: in function `Construct'
[string "@Interface/AddOns/BagBrother/libs/Poncho-2.0/Poncho-2.0.lua"]:81: in function <...ace/AddOns/BagBrother/libs/Poncho-2.0/Poncho-2.0.lua:75>
[string "=(tail call)"]: ?
[string "@Interface/AddOns/BagBrother/core/classes/parented.lua"]:10: in function <...nterface/AddOns/BagBrother/core/classes/parented.lua:9>
[string "=(tail call)"]: ?
[string "@Interface/AddOns/BagBrother/core/classes/playerMoney.lua"]:26: in function <...rface/AddOns/BagBrother/core/classes/playerMoney.lua:25>
[string "=(tail call)"]: ?
[string "@Interface/AddOns/BagBrother/core/classes/frameBase.lua"]:125: in function `GetWidget'
[string "@Interface/AddOns/Bagnon/src/frame.lua"]:251: in function <Interface/AddOns/Bagnon/src/frame.lua:248>
[string "=(tail call)"]: ?
[string "@Interface/AddOns/Bagnon/src/frame.lua"]:54: in function `Layout'
[string "@Interface/AddOns/BagBrother/core/classes/frameBase.lua"]:58: in function `Update'
[string "@Interface/AddOns/BagBrother/core/classes/frameBase.lua"]:32: in function <...terface/AddOns/BagBrother/core/classes/frameBase.lua:24>
[string "=(tail call)"]: ?
[string "@Interface/AddOns/BagBrother/frames/inventory/inventory.lua"]:27: in function <...ace/AddOns/BagBrother/frames/inventory/inventory.lua:26>
[string "=[C]"]: in function `Show'
[string "@Interface/AddOns/BagBrother/core/api/frames.lua"]:32: in function `Show'
[string "@Interface/AddOns/BagBrother/core/api/frames.lua"]:24: in function <Interface/AddOns/BagBrother/core/api/frames.lua:23>
[string "=(tail call)"]: ?
[string "=(tail call)"]: ?
[string "@Interface/AddOns/BagBrother/core/features/autoDisplay.lua"]:83: in function `ToggleBackpack'
[string "TOGGLEBACKPACK"]:1: in function <[string "TOGGLEBACKPACK"]:1>
Message: ...rface/AddOns/BagBrother/core/classes/playerMoney.lua:48: attempt to index global 'MoneyTypeInfo' (a nil value)
Time: Tue Apr 8 22:03:42 2025
Count: 2
Stack: ...rface/AddOns/BagBrother/core/classes/playerMoney.lua:48: attempt to index global 'MoneyTypeInfo' (a nil value)
[string "=[C]"]: ?
[string "@Interface/AddOns/BagBrother/core/classes/playerMoney.lua"]:48: in function `Construct'
[string "@Interface/AddOns/BagBrother/libs/Poncho-2.0/Poncho-2.0.lua"]:81: in function <...ace/AddOns/BagBrother/libs/Poncho-2.0/Poncho-2.0.lua:75>
[string "=(tail call)"]: ?
[string "@Interface/AddOns/BagBrother/core/classes/parented.lua"]:10: in function <...nterface/AddOns/BagBrother/core/classes/parented.lua:9>
[string "=(tail call)"]: ?
[string "@Interface/AddOns/BagBrother/core/classes/playerMoney.lua"]:26: in function <...rface/AddOns/BagBrother/core/classes/playerMoney.lua:25>
[string "=(tail call)"]: ?
[string "@Interface/AddOns/BagBrother/core/classes/frameBase.lua"]:125: in function `GetWidget'
[string "@Interface/AddOns/Bagnon/src/frame.lua"]:251: in function <Interface/AddOns/Bagnon/src/frame.lua:248>
[string "=(tail call)"]: ?
[string "@Interface/AddOns/Bagnon/src/frame.lua"]:54: in function `Layout'
Reproduction Steps
open bags.
Last Working Version
No response
Screenshots
No response
i got the same problem
33x ...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>
[C]: in function '?'
[BagBrother/core/features/autoDisplay.lua]:18: in function <...faceBagBrother/core/features/autoDisplay.lua:18>
[BagBrother/core/features/autoDisplay.lua]:83: in function 'ToggleAllBags'
[OPENALLBAGS]:1: in function <[string "OPENALLBAGS"]:1>
Locals:
self =
__super =
}
__base =
}
__index =
}
__name = "BagnonPlayerMoney"
Type = "PLAYER"
__frames =
}
__type = "Button"
__count = 1
__template = "SmallMoneyFrameTemplate"
Gray = "|cff999999%s|r"
}
f = BagnonPlayerMoney1 {
GoldButton = BagnonPlayerMoney1GoldButton {
}
vadjust = 2
trialErrorButton = BagnonPlayerMoney1TrialErrorButton {
}
CopperButton = BagnonPlayerMoney1CopperButton {
}
moneyType = "PLAYER"
info =
}
staticMoney = 74686501
SilverButton = BagnonPlayerMoney1SilverButton {
}
small = 1
}
overlay = Button {
}
(*temporary) = nil
(*temporary) = "PLAYER"
(*temporary) = "anyUp"
(*temporary) = "attempt to index global 'MoneyTypeInfo' (a nil value)"
Money =
__super =
}
__base =
}
__index =
}
__name = "BagnonPlayerMoney"
Type = "PLAYER"
__frames =
}
__type = "Button"
__count = 1
__template = "SmallMoneyFrameTemplate"
Gray = "|cff999999%s|r"
}
Same error here. Retail
Was working earlier today, which boggles me that it would break when nothing changed.
I commented line 48 and it seems to be working fine, but didn't check exhaustively.
Same issue here, can confirm:
24x` ...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'
...[Blizzard_UIParentPanelManager/Mainline/UIParentPanelManager.lua]:885: in function <...ParentPanelManager/Mainline/UIParentPanelManager.lua:871>
[C]: ?
[C]: ?
[C]: ?
[C]: in function 'ShowUIPanel'
[Blizzard_UIPanels_Game/Shared/PlayerInteractionFrameManager.lua]:75: in function 'showFunc'
[Blizzard_UIPanels_Game/Shared/PlayerInteractionFrameManager.lua]:202: in function <...Panels_Game/Shared/PlayerInteractionFrameManager.lua:187>
[C]: ?
[BagBrother/core/features/autoDisplay.lua]:84: in function 'ShowFrame'
[Blizzard_UIPanels_Game/Shared/PlayerInteractionFrameManager.lua]:240: in function <...Panels_Game/Shared/PlayerInteractionFrameManager.lua:237>
Locals:
self =
__super =
}
__base =
}
__index =
}
__name = "BagnonPlayerMoney"
Type = "PLAYER"
__frames =
}
__type = "Button"
__count = 1
__template = "SmallMoneyFrameTemplate"
Gray = "|cff999999%s|r"
}
f = BagnonPlayerMoney1 {
GoldButton = BagnonPlayerMoney1GoldButton {
}
vadjust = 0
trialErrorButton = BagnonPlayerMoney1TrialErrorButton {
}
CopperButton = BagnonPlayerMoney1CopperButton {
}
moneyType = "PLAYER"
info =
}
staticMoney = 366656875
SilverButton = BagnonPlayerMoney1SilverButton {
}
small = 1
}
overlay = Button {
}
(*temporary) = nil
(*temporary) = "PLAYER"
(*temporary) = "anyUp"
(*temporary) = "attempt to index global 'MoneyTypeInfo' (a nil value)"
Money =
__super =
}
__base =
}
__index =
}
__name = "BagnonPlayerMoney"
Type = "PLAYER"
__frames =
}
__type = "Button"
__count = 1
__template = "SmallMoneyFrameTemplate"
Gray = "|cff999999%s|r"
}
Yup I suddenly started getting this exact error on all my toons this evening.
Earlier today no issue.
I also commented line 48 and have had no issue since
Same issue here, bagnon not opening when pressing the button. Same goes for bank windows etc
Same error here. Retail Was working earlier today, which boggles me that it would break when nothing changed.
I commented line 48 and it seems to be working fine, but didn't check exhaustively.
Same error, commenting line 48 worked for me as well. When I switched on my computer this morning, I got the message "WoW is now playable" so there must have been some update since yesterday.
Thanks.
by chatgpt
I encountered the same issue on WoW Retail 11.1.0.60189, where MoneyTypeInfo and SmallMoneyFrame_Initialize no longer exist.
Here's a working fix for BagBrother/core/classes/playerMoney.lua that uses the updated money frame API introduced in recent client versions.
Changes:
Removed dependency on MoneyTypeInfo
Avoided use of SmallMoneyFrame_Initialize
Used MoneyFrame_Update directly with stored money values
--[[
Displays the player money stack.
All Rights Reserved
--]]
local ADDON, Addon = ...
local C = LibStub('C_Everywhere')
local Money = Addon.Tipped:NewClass('PlayerMoney', 'Button', 'SmallMoneyFrameTemplate', true)
Money.Gray = LIGHTGRAY_FONT_COLOR:WrapTextInColorCode('%s')
Money.Type = 'PLAYER'
local Stroke = CreateFrame('Frame')
Stroke:SetHeight(5)
local Line = Stroke:CreateLine()
Line:SetStartPoint('LEFT', 0, -5)
Line:SetEndPoint('RIGHT', 0, -5)
Line:SetColorTexture(.3, .3, .3)
Line:SetThickness(1)
--[[ Construct ]]--
function Money:New(parent)
local f = self:Super(Money):New(parent)
f:SetScript('OnShow', f.RegisterEvents)
f:SetScript('OnHide', f.UnregisterAll)
return f
end
function Money:Construct()
local f = self:Super(Money):Construct()
f.trialErrorButton:SetPoint('LEFT', -14, 0)
f:SetScript('OnShow', f.RegisterEvents)
f:SetScript('OnHide', f.UnregisterAll)
f:SetScript('OnEvent', nil)
f:SetHeight(24)
local overlay = CreateFrame('Button', nil, f)
overlay:SetScript('OnClick', function(_, ...) f:OnClick(...) end)
overlay:SetScript('OnEnter', function() f:OnEnter() end)
overlay:SetScript('OnLeave', function() f:OnLeave() end)
overlay:SetFrameLevel(f:GetFrameLevel() + 4)
overlay:RegisterForClicks('anyUp')
overlay:SetAllPoints()
f.overlay = overlay
-- 模擬 MoneyTypeInfo 用法,保留 info.UpdateFunc 結構
f.info = {
UpdateFunc = function(self)
return self:GetMoney()
end
}
-- 初始化金幣按鈕的點擊事件
local function SetCoinButtonClick(button, value)
button:SetScript("OnClick", function()
if f:IsCached() then return end
OpenCoinPickupFrame(value, f:GetMoney(), f)
f.hasPickup = 1
f:OnLeave()
end)
end
SetCoinButtonClick(f.GoldButton, COPPER_PER_GOLD)
SetCoinButtonClick(f.SilverButton, COPPER_PER_SILVER)
SetCoinButtonClick(f.CopperButton, 1)
return f
end
function Money:RegisterEvents()
self:RegisterFrameSignal('OWNER_CHANGED', 'Update')
self:RegisterEvent('PLAYER_MONEY', 'Update')
self:Update()
end
function Money:Update()
local money = self:GetMoney()
MoneyFrame_Update(self:GetName(), money, money == 0)
end
--[[ Interaction ]]--
function Money:OnClick()
-- 這段理論上不會被觸發,行為已轉移至各按鈕
end
function Money:OnEnter()
GameTooltip:SetOwner(self:GetTipAnchor())
GameTooltip:SetText(MONEY, 1,1,1)
local total = 0
for i, owner in Addon.Owners:Iterate() do
local money = not owner.isguild and owner:GetMoney()
if money then
local coins = GetMoneyString(money, true)
local icon = owner:GetIconMarkup(12,0,0)
local color = owner:GetColor(owner)
GameTooltip:AddDoubleLine(icon .. ' ' .. owner.name, coins, color.r, color.g, color.b, color.r, color.g, color.b)
end
total = total + (money or 0)
end
local account = (C.Bank.FetchDepositedMoney or nop)(2) or 0
if account > 0 then
GameTooltip:AddDoubleLine('|A:questlog-questtypeicon-account:0:0|a '..ACCOUNT_QUEST_LABEL, GetMoneyString(account, true))
end
GameTooltip_InsertFrame(GameTooltip, Stroke)
GameTooltip:AddDoubleLine(self.Gray:format(TOTAL), self.Gray:format(GetMoneyString(total + account, true)))
GameTooltip:Show()
Stroke:SetWidth(GameTooltip:GetWidth() - 20)
end
--[[ API ]]--
function Money:GetMoney()
return self:GetOwner():GetMoney() or 0
end
function Money:GetTipAnchor()
return self, 'ANCHOR_TOP'
end
Instructions
Open notepad and locate your wow addons (example - D:\Games\World of Warcraft_classic_era_\Interface\AddOns\BagBrother\core\classes) folder under your realm.
In [BagBrother/core/classes/playerMoney.lua]:48: <- line number 48
local overlay = CreateFrame('Button', nil, f)
overlay:SetScript('OnClick', function(_,...) f:OnClick(...) end)
overlay:SetScript('OnEnter', function() f:OnEnter() end)
overlay:SetScript('OnLeave', function() f:OnLeave() end)
overlay:SetFrameLevel(f:GetFrameLevel() + 4)
overlay:RegisterForClicks('anyUp')
overlay:SetAllPoints()
f.info = MoneyTypeInfo[f.Type] <-- this line here
f.overlay = overlay
return f
replace with the entire line
f.info = (MoneyTypeInfo and MoneyTypeInfo[f.Type]) or { UpdateFunc = function(self) return self:GetMoney() end }
Same issues
Message: ...rface/AddOns/BagBrother/core/classes/playerMoney.lua:48: attempt to index global 'MoneyTypeInfo' (a nil value)
Time: Wed Apr 9 08:16:05 2025
Count: 2
Stack:
[Interface/AddOns/BagBrother/core/classes/playerMoney.lua]:48: in function 'Construct'
[Interface/AddOns/BagBrother/libs/Poncho-2.0/Poncho-2.0.lua]:81: in function <...ace/AddOns/BagBrother/libs/Poncho-2.0/Poncho-2.0.lua:75>
[tail call]: ?
[Interface/AddOns/BagBrother/core/classes/parented.lua]:10: in function <...nterface/AddOns/BagBrother/core/classes/parented.lua:9>
[tail call]: ?
[Interface/AddOns/BagBrother/core/classes/playerMoney.lua]:26: in function <...rface/AddOns/BagBrother/core/classes/playerMoney.lua:25>
[tail call]: ?
[Interface/AddOns/BagBrother/core/classes/frameBase.lua]:125: in function 'GetWidget'
[Interface/AddOns/Bagnon/src/frame.lua]:251: in function <Interface/AddOns/Bagnon/src/frame.lua:248>
[tail call]: ?
[Interface/AddOns/Bagnon/src/frame.lua]:54: in function 'Layout'
[Interface/AddOns/BagBrother/core/classes/frameBase.lua]:58: in function 'Update'
[Interface/AddOns/BagBrother/core/classes/frameBase.lua]:32: in function <...terface/AddOns/BagBrother/core/classes/frameBase.lua:24>
[tail call]: ?
[Interface/AddOns/BagBrother/frames/inventory/inventory.lua]:27: in function <...ace/AddOns/BagBrother/frames/inventory/inventory.lua:26>
[C]: in function 'Show'
[Interface/AddOns/BagBrother/core/api/frames.lua]:32: in function 'Show'
[Interface/AddOns/BagBrother/core/api/frames.lua]:24: in function <Interface/AddOns/BagBrother/core/api/frames.lua:23>
[tail call]: ?
[Interface/AddOns/BagBrother/core/features/autoDisplay.lua]:83: in function 'ToggleAllBags'
[OPENALLBAGS]:1: in function <[string "OPENALLBAGS"]:1>
Locals:
self =
__super =
}
__base =
}
__index =
}
__name = "BagnonPlayerMoney"
Type = "PLAYER"
__frames =
}
__type = "Button"
__count = 3
__template = "SmallMoneyFrameTemplate"
Gray = "%s"
}
f = BagnonPlayerMoney3 {
GoldButton = BagnonPlayerMoney3GoldButton {
}
vadjust = 0
trialErrorButton = BagnonPlayerMoney3TrialErrorButton {
}
CopperButton = BagnonPlayerMoney3CopperButton {
}
moneyType = "PLAYER"
info =
}
staticMoney = 13362315
SilverButton = BagnonPlayerMoney3SilverButton {
}
small = 1
}
overlay = Button {
}
(*temporary) = nil
(*temporary) = "PLAYER"
(*temporary) = "anyUp"
(*temporary) = "attempt to index global 'MoneyTypeInfo' (a nil value)"
Money =
__super =
}
__base =
}
__index =
}
__name = "BagnonPlayerMoney"
Type = "PLAYER"
__frames =
}
__type = "Button"
__count = 3
__template = "SmallMoneyFrameTemplate"
Gray = "%s"
}
This seems to work, though
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 }
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 }
For Cataclysm Classic, it's in BagBrother\addons\core\classes\money.lua:36
Same error here. Retail Was working earlier today, which boggles me that it would break when nothing changed.
I commented line 48 and it seems to be working fine, but didn't check exhaustively.
I am sorry, i do not know what this means. commented line 48?? do what now with whose what?
I do not understand what you mean by commentd line 48 and it works. what are you talking about. can someone give me a detailed walk through?
I do not understand what you mean by commentd line 48 and it works. what are you talking about. can someone give me a detailed walk through?
Try this #2041 (comment)