I have a few fixes to some obscure errors that I've seen crop up when using Guild Check.
1) Guild Check crashes when left clicking on the minimap button.
This is due to the GUI not being created yet. 2 things needed to fix this. First, add this before showing the GUI when left clicking the minimap:
if not self.gui then
Second, add this at the start of the function GuildCheck:CreateGui so that it doesn't attempt to create it twice:
if self.gui then return end
2) When scanning a guild, LibStub sometimes evaluates to a string when checking a player's rank.
This is just about the oddest LUA error I've seen yet. Two things I used to fix this. First, check to see if LibStub is a string before even starting the function:
if type(LibStub) == "string" then
self:Debug("LibStub: " .. type(LibStub))
self:Debug("Delay: " .. self:GetDelay())
self.scanning = false
Second, after this, cache LibStub(LG) and use the cached value instead of LibStub(LG):
local LibG = LibStub(LG)
Then find LibStub(LG) and replace with LibG in the GuildCheck:ScanGuild function.
The full source code, based on 2.3.9 with the line 623 fix mentioned in a previous bug, is available at http://www.roncli.com/files/guildCheckLuaFixes.zip
Thanks for the addon. :)
|roncli||Oct 19, 2012 at 00:58 UTC||Create|