Thread Tools Display Modes
Prev Previous Post   Next Post Next
12/02/20, 07:04 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,028
I'd register a callback function to this event to start your code as the guilddata is ready:
https://github.com/esoui/esoui/blob/...shared.lua#L35

Lua Code:
  1. local function OnGuildDataReady(guildId)
  2. ...
  3. end
  4.  
  5. GUILD_BROWSER_MANAGER:RegisterCallback("OnGuildDataReady", OnGuildDataReady)

This is how the ZOs code does it.

Create your own callback register and use e.g. anoher local function MyOnGuildDataReady, and in there do your checks on the guilddata. This should strip your "wait some time" code as it shouldl fire as your requested guildData IS ready.

Maybe this will already fix he 0 issue then.

btw: Did you check the guildId is correct and given? Maybe it is 0 itsself and thus the function returns 0 ?


Guild size data:
https://github.com/esoui/esoui/blob/...nager.lua#L199
Maybe this helps and returns another value (which would make me wonder) GetGuildSizeAttribute(guildId)

Last edited by Baertram : 12/02/20 at 07:12 AM.
  Reply With Quote
 

ESOUI » Developer Discussions » Bug Reports » [open] Guilds: Number of members is displayed/returned incorrectly


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off