WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   oGlowClassic GuildBank issues (https://www.wowinterface.com/forums/showthread.php?t=58960)

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:
  1. Message: Interface\AddOns\oGlowClassic\displays\border.lua:43: attempt to index local 'frame' (a nil value)
  2. Time: Fri Oct 29 12:39:53 2021
  3. Count: 2
  4. Stack: Interface\AddOns\oGlowClassic\displays\border.lua:43: attempt to index local 'frame' (a nil value)
  5. [string "@Interface\AddOns\oGlowClassic\displays\border.lua"]:43: in function `?'
  6. [string "@Interface\AddOns\oGlowClassic\oglow-classic.lua"]:99: in function `CallFilters'
  7. [string "@Interface\AddOns\oGlowClassic\pipes\gbank.lua"]:23: in function <Interface\AddOns\oGlowClassic\pipes\gbank.lua:6>
  8. [string "=(tail call)"]: ?
  9.  
  10. Locals: frame = nil
  11. color = nil
  12. (*temporary) = nil
  13. (*temporary) = nil
  14. (*temporary) = nil
  15. (*temporary) = nil
  16. (*temporary) = nil
  17. (*temporary) = nil
  18. (*temporary) = nil
  19. (*temporary) = "attempt to index local 'frame' (a nil value)"
  20. createBorder = <function> defined @Interface\AddOns\oGlowClassic\displays\border.lua:7
  21. colorTable = <table> {
  22.  1 = <table> {
  23.  }
  24.  2 = <table> {
  25.  }
  26.  3 = <table> {
  27.  }
  28.  4 = <table> {
  29.  }
  30.  5 = <table> {
  31.  }
  32.  6 = <table> {
  33.  }
  34.  7 = <table> {
  35.  }
  36.  0 = <table> {
  37.  }
  38. }


lua code modified from oGlow,
Lua Code:
  1. -- TODO:
  2. --  - Write a description.
  3.  
  4. local _E
  5.  
  6. local update = function(self)
  7.     -- We shouldn't really do this. The correct solution would be to delay the
  8.     -- event registration until Blizzard_GuildBankUI is loaded, but we use this
  9.     -- solution for now.
  10.     if not IsAddOnLoaded("Blizzard_GuildBankUI") then return end
  11.     if (GuildBankFrame:IsShown()) then
  12.         local tab = GetCurrentGuildBankTab()
  13.         for i=1, MAX_GUILDBANK_SLOTS_PER_TAB or 98 do
  14.             local index = math.fmod(i, 14)
  15.             if(index == 0) then
  16.                 index = 14
  17.             end
  18.             local column = math.ceil((i-0.5)/14)
  19.  
  20.             local slotLink = GetGuildBankItemLink(tab, i)
  21.             --local slotFrame = _G["GuildBankColumn"..column.."Button"..index]  -- source code from oGlow, not working
  22.             local slotFrame = _G["GuildBankFrame.Column"..column..".Button"..index]  -- from /fstack, not working either
  23.             print(slotFrame) -- ***** return nil
  24.  
  25.             self:CallFilters('gbank', slotFrame, _E and slotLink)
  26.         end
  27.     end
  28. end
  29.  
  30. local enable = function(self)
  31.     _E = true
  32.  
  33.     self:RegisterEvent('GUILDBANKBAGSLOTS_CHANGED', update)
  34.     self:RegisterEvent('GUILDBANKFRAME_OPENED', update)
  35. end
  36.  
  37. local disable = function(self)
  38.     _E = nil
  39.  
  40.     self:UnregisterEvent('GUILDBANKBAGSLOTS_CHANGED', update)
  41.     self:UnregisterEvent('GUILDBANKFRAME_OPENED', update)
  42. end
  43.  
  44. oGlowClassic:RegisterPipe('gbank', enable, disable, update, 'Guild bank frame', nil)


All times are GMT -6. The time now is 02:46 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI