WoW:API GetNumFriends: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
m (Move page script moved page API GetNumFriends to API GetNumFriends without leaving a redirect)
 
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
  <center>'''GetNumFriends''' ''-Documentation by jpopcenter-''</center>
{{wowapi}} __NOTOC__
Returns how many friends you have.
  numberOfFriends, onlineFriends = GetNumFriends()


Returns number of friends.
== Parameters ==
=== Returns ===
:;numberOfFriends : Integer - The number of friends you have (i.e. the highest valid friend index you can use to get friend information).
:;onlineFriends : Integer - The number of online friends.


numberOfFriends = GetNumFriends();
== Example ==
 
  DEFAULT_CHAT_FRAME:AddMessage("I've got " .. (GetNumFriends()) .. " friend(s)");
----
==== Result ====
;''Arguments''
Displays the number of friends you currently have in the default chat frame.
 
:;None
 
----
;''Returns''
 
:(Number numberOfFriends)
 
:;numberOfFriends : The number of friends.
 
----
;''Example''
  DEFAULT_CHAT_FRAME:AddMessage("I've got " .. GetNumFriends() .. " friend(s)");
 
;''Result''
 
Prints a message in the default chat frame.
 
----
;''Description''
 
: Returns number of friends.
 
----
{{Template:WoW API}}
[[Category:API Functions|GetNumFriends]]
[[Category:API Friend Functions|GetNumFriends]]

Latest revision as of 04:46, 15 August 2023

WoW API < GetNumFriends

Returns how many friends you have.

numberOfFriends, onlineFriends = GetNumFriends()

Parameters[edit]

Returns[edit]

numberOfFriends
Integer - The number of friends you have (i.e. the highest valid friend index you can use to get friend information).
onlineFriends
Integer - The number of online friends.

Example[edit]

DEFAULT_CHAT_FRAME:AddMessage("I've got " .. (GetNumFriends()) .. " friend(s)");

Result[edit]

Displays the number of friends you currently have in the default chat frame.