Fandom

WoWWiki

API GetNumGuildMembers

104,634pages on
this wiki
Add New Page
Talk3 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

WoW API < GetNumGuildMembers

Returns the total and online number of guild members.

numTotalMembers, numOnlineMaxLevelMembers, numOnlineMembers = GetNumGuildMembers();

ParametersEdit

ReturnsEdit

numTotalMembers
Integer - total number of people in the guild, or 0 if player is not in a guild.
numOnlineMaxLevelMembers
Integer - total number of people in the guild that are at the level cap, or 0 if player is not in a guild. (Does not include remote chat members)
numOnlineMembers
Integer - number of online people in the guild, or 0 if the player is not in a guild.

ExampleEdit

local numTotal, numOnlineMaxLevel, numOnline = GetNumGuildMembers();
DEFAULT_CHAT_FRAME:AddMessage(numTotal .. " guild members: " .. numOnline .. " online (" .. numOnlineMaxLevel .. " at maximum level), " .. (numTotal - numOnline) .. " offline.");

ResultEdit

Displays the number of people online, offline, and the total headcount of your guild in the default chat frame.

NotesEdit

You may need to call GuildRoster() first in order to obtain correct data. May return wrong values immediately after quitting a guild. Maximum returned value is 1000.

Also on Fandom

Random Wiki