- Lua/XML Help
I've already written a script to get guild permissions with regards to Officer Notes. However, I've run into a bit of a snag on the login process. It appears my addon loads considerably before any guild information is retrieved and it errors out. What's the best way to go about waiting until guild information is received? Listening for GUILD_ROSTER_UPDATE doesn't seem to do the trick
||08-10-19 10:34 PM
Guild roster information is not available at a consistent time during loading or even after the game finishes loading. You have to force load the info using GuildRoster() as early as possible.
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:
elseif event == "GUILD_ROSTER_UPDATE" then
if IsInGuild() then
GildamDB[cfg.REALM_NAME][cfg.PLAYER_NAME].Guild.name = GetGuildInfo("player")
|All times are GMT -6. The time now is 06:13 PM.
vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI