Im my addon I use GUILD ROSTER UPDATE.
While testing I noticed its fires two times during the loading process but the first time the guild infornation is sometimes not available.
This is the code I use:
Code:
elseif event == "GUILD_ROSTER_UPDATE" then
--print("GUILD_ROSTER_UPDATE")
GuildInfo()
if IsInGuild() then
GildamDB[cfg.REALM_NAME][cfg.PLAYER_NAME].Guild.name = GetGuildInfo("player")
Gildam_Roster()
end
end