I need to know when guild functions become available, and how to delay some initialize functions until they're available (IE. is there an event I can register for?).
Example:
Code:
function mymod_OnLoad()
if (GetGuildInfo("player")) == "some clan name" then
DEFAULT_CHAT_FRAME:AddMessage("You're in the some clan name guild");
else
DEFAULT_CHAT_FRAME:AddMessage("You're in guild " .. (GetGuildInfo("player")));
end
DEFAULT_CHAT_FRAME:AddMessage("Done initializing");
end
When my mod first loads, this function outputs NOTHING. It doesn't return a true or false value, it merely ends the script immediately with no warning or error.
However, after a ReloadUI() this function works as expected, and returns an appropriate message.
When do functions like these become available for use, and how can I run an initialization function when they become available?