Added "numOnlineMaxLevelMembers" to the code examples.
(→Returns: Update to include MoP api changes) |
(Added "numOnlineMaxLevelMembers" to the code examples.) |
||
| Line 1: | Line 1: | ||
{{wowapi}} __NOTOC__ | {{wowapi}} __NOTOC__ | ||
Returns the total and online number of guild members. | Returns the total and online number of guild members. | ||
numTotalMembers, numOnlineMembers = GetNumGuildMembers(); | numTotalMembers, numOnlineMaxLevelMembers, numOnlineMembers = GetNumGuildMembers(); | ||
==Parameters== | ==Parameters== | ||
===Returns=== | ===Returns=== | ||
:;numTotalMembers : Integer - total number of people in the guild, or 0 if player is not in a guild. | :;numTotalMembers | ||
:;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) | :: Integer - total number of people in the guild, or 0 if player is not in a guild. | ||
:;numOnlineMembers : Integer - number of online people in the guild, or 0 if the 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. | |||
==Example== | ==Example== | ||
local numTotal, numOnline = GetNumGuildMembers(); | local numTotal, numOnlineMaxLevel, numOnline = GetNumGuildMembers(); | ||
DEFAULT_CHAT_FRAME:AddMessage(numTotal .. " guild members: " .. numOnline .. " online, " .. (numTotal - numOnline) .. " offline."); | DEFAULT_CHAT_FRAME:AddMessage(numTotal .. " guild members: " .. numOnline .. " online (" .. numOnlineMaxLevel .. " at maximum level), " .. (numTotal - numOnline) .. " offline."); | ||
===Result=== | ===Result=== | ||
Displays the number of people online, offline, and the total headcount of your guild in the default chat frame. | Displays the number of people online, offline, and the total headcount of your guild in the default chat frame. | ||