WoW:API GetNumWhoResults: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(upgraded deprecated template)
No edit summary
 
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{wowapi}}
{{wowapi}} __NOTOC__
<center>'''Title''' ''-Documentation by [[user:Mikk|Mikk]]-''</center>


Get the number of entries resulting from your most recent /who query.
Get the number of entries resulting from your most recent /who query.
  numWhos, totalCount = GetNumWhoResults();


<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
== Arguments ==
  numWhos, totalCount = GetNumWhoResults();
:None


== Parameters ==
== Returns ==
=== Returns ===
;''Returns''
:totalCount, numWhos
:totalCount, numWhos


Line 15: Line 13:
:;numWhos : Number - number of entries actually returned
:;numWhos : Number - number of entries actually returned


Normally, these two will be returned as the same number.
== Details ==
 
: This function only returns the last /who query results after the "[[Events/W#WHO_LIST_UPDATE|WHO_LIST_UPDATE]]" event has fired.
However, if the query matched more players than the server wants to return (currently 49), totalCount will be returned as 50 and numWhos will be returned as 49. Hence, totalCount being greater than numWhos seems to be a future-safe indication of the list having been truncated.
 
 
''FrameXML has these two names swapped around, but I suspect that it is a bug. There is code to display a warning about the list being truncated, but it never triggers. -- [[User:Mikk|Mikk]] 15:47, 16 May 2006 (EDT)''
 
 
----
__NOTOC__

Latest revision as of 07:14, 15 August 2023

WoW API < GetNumWhoResults

Get the number of entries resulting from your most recent /who query.

  numWhos, totalCount = GetNumWhoResults();

Arguments[edit]

None

Returns[edit]

totalCount, numWhos
totalCount
Number - number of users matching the query
numWhos
Number - number of entries actually returned

Details[edit]

This function only returns the last /who query results after the "WHO_LIST_UPDATE" event has fired.