WoW:API GetNumPartyMembers: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
m (Move page script moved page API GetNumPartyMembers to API GetNumPartyMembers without leaving a redirect)
 
(6 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<center>'''GetNumPartyMembers''' ''-Documentation by Sarf-''</center>
{{wowapi}} __NOTOC__
{{removedapi|5.0.4|Instead use [[API GetNumGroupMembers|GetNumGroupMembers]] or [[API GetNumSubgroupMembers|GetNumSubgroupMembers]]}}


Returns number of party members.
Returns number of party members.
partyMembers = GetNumPartyMembers()


numberOfPartyMembers = GetNumPartyMembers();
==Returns==
;partyMembers : Number - The number of party members, excluding the player (0 to 4).


----
==Example==
;''Arguments''
The snippet below adds a message stating the number of people in the player's current party to the default chat frame.
print("There are " .. GetNumPartyMembers() .. " other people in your party.");


:;None
==Notes==
* While in a battleground, this function returns information about your battleground party. You may retrieve information about your non-battleground party using {{api|GetRealNumPartyMembers}}().
* While in a raid, you are also in a party. You might be the only person in your raidparty, so this function could still return 0.


----
==See Also==
;''Returns''
* {{api|GetNumGroupMembers}}
* {{api|GetNumSubgroupMembers}}
* {{api|GetPartyMember}}


:(Number numberOfPartyMembers)
* {{api|GetNumRaidMembers}} (Removed 5.0.4)
 
* {{api|GetRealNumPartyMembers}} (Removed 5.0.4)
:;numberOfPartyMembers : The number of party members - from 0 to 4 (excluding the player).
 
----
;''Example''
if ( GetNumPartyMembers() > 0 ) then CastSpellByName("Aura of Retribution"); end
 
;''Result''
 
Casts Aura of Retribution if player is in a group.
 
----
;''Description''
 
: Returns number of party members.
 
;''See Also''
 
:* [[API GetNumRaidMembers|GetNumRaidMembers]]
 
----
{{Template:WoW API}}

Latest revision as of 04:46, 15 August 2023

WoW API < GetNumPartyMembers

Returns number of party members.

partyMembers = GetNumPartyMembers()

Returns[edit]

partyMembers
Number - The number of party members, excluding the player (0 to 4).

Example[edit]

The snippet below adds a message stating the number of people in the player's current party to the default chat frame.

print("There are " .. GetNumPartyMembers() .. " other people in your party.");

Notes[edit]

  • While in a battleground, this function returns information about your battleground party. You may retrieve information about your non-battleground party using GetRealNumPartyMembers().
  • While in a raid, you are also in a party. You might be the only person in your raidparty, so this function could still return 0.

See Also[edit]