WoW:API GetPartyMember: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Update based on talk + live testing.) |
||
Line 1: | Line 1: | ||
{{wowapi}} __NOTOC__ | |||
Returns 1 if the specified party member exists, nil otherwise. | |||
memberExists = GetPartyMember(index); | |||
==Parameters== | |||
===Arguments=== | |||
:;index : Number - Which party member to query (1-4). | |||
===Returns=== | |||
:;memberExists: Flag - If the specified party member exists, returns 1, otherwise <tt>nil</tt>. | |||
==Example== | |||
memberCount = 0 | |||
for groupindex = 1,MAX_PARTY_MEMBERS do | |||
if (GetPartyMember(groupindex)) then | |||
memberCount = memberCount + 1 | |||
end | end | ||
end | |||
===Result=== | |||
Will count the number of members in the party (not the best way to do that but it's a reasonable example). | |||
Revision as of 22:36, 23 December 2006
Returns 1 if the specified party member exists, nil otherwise.
memberExists = GetPartyMember(index);
Parameters
Arguments
- index
- Number - Which party member to query (1-4).
Returns
- memberExists
- Flag - If the specified party member exists, returns 1, otherwise nil.
Example
memberCount = 0 for groupindex = 1,MAX_PARTY_MEMBERS do if (GetPartyMember(groupindex)) then memberCount = memberCount + 1 end end
Result
Will count the number of members in the party (not the best way to do that but it's a reasonable example).