sh4dowburn |
10-29-21 12:20 AM |
oGlowClassic GuildBank issues
BCC finally added GuildBank,
I'm trying to get it worked,
but somehow the framename become nil.
here is error msg in game,
Lua Code:
Message: Interface\AddOns\oGlowClassic\displays\border.lua:43: attempt to index local 'frame' (a nil value) Time: Fri Oct 29 12:39:53 2021 Count: 2 Stack: Interface\AddOns\oGlowClassic\displays\border.lua:43: attempt to index local 'frame' (a nil value) [string "@Interface\AddOns\oGlowClassic\displays\border.lua"]:43: in function `?' [string "@Interface\AddOns\oGlowClassic\oglow-classic.lua"]:99: in function `CallFilters' [string "@Interface\AddOns\oGlowClassic\pipes\gbank.lua"]:23: in function <Interface\AddOns\oGlowClassic\pipes\gbank.lua:6> [string "=(tail call)"]: ? Locals: frame = nil color = nil (*temporary) = nil (*temporary) = nil (*temporary) = nil (*temporary) = nil (*temporary) = nil (*temporary) = nil (*temporary) = nil (*temporary) = "attempt to index local 'frame' (a nil value)" createBorder = <function> defined @Interface\AddOns\oGlowClassic\displays\border.lua:7 colorTable = <table> { 1 = <table> { } 2 = <table> { } 3 = <table> { } 4 = <table> { } 5 = <table> { } 6 = <table> { } 7 = <table> { } 0 = <table> { } }
lua code modified from oGlow,
Lua Code:
-- TODO: -- - Write a description. local _E local update = function(self) -- We shouldn't really do this. The correct solution would be to delay the -- event registration until Blizzard_GuildBankUI is loaded, but we use this -- solution for now. if not IsAddOnLoaded("Blizzard_GuildBankUI") then return end if (GuildBankFrame:IsShown()) then local tab = GetCurrentGuildBankTab() for i=1, MAX_GUILDBANK_SLOTS_PER_TAB or 98 do local index = math.fmod(i, 14) if(index == 0) then index = 14 end local column = math.ceil((i-0.5)/14) local slotLink = GetGuildBankItemLink(tab, i) --local slotFrame = _G["GuildBankColumn"..column.."Button"..index] -- source code from oGlow, not working local slotFrame = _G["GuildBankFrame.Column"..column..".Button"..index] -- from /fstack, not working either print(slotFrame) -- ***** return nil self:CallFilters('gbank', slotFrame, _E and slotLink) end end end local enable = function(self) _E = true self:RegisterEvent('GUILDBANKBAGSLOTS_CHANGED', update) self:RegisterEvent('GUILDBANKFRAME_OPENED', update) end local disable = function(self) _E = nil self:UnregisterEvent('GUILDBANKBAGSLOTS_CHANGED', update) self:UnregisterEvent('GUILDBANKFRAME_OPENED', update) end oGlowClassic:RegisterPipe('gbank', enable, disable, update, 'Guild bank frame', nil)
|