WoW:API GetNumFriends: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
m (Minor reformatting.)
Line 1: Line 1:
<center>'''GetNumFriends''' ''-Documentation by jpopcenter-''</center>
<center>'''GetNumFriends''' - ''Documentation by jpopcenter''</center>


Returns number of friends.
Returns how many friends you have.


numberOfFriends = GetNumFriends();
numberOfFriends = GetNumFriends()
== Parameters ==
=== Returns ===
:numberOfFriends


----
:;numberOfFriends : Integer - The number of friends you have (i.e. the highest valid friend index you can use to get friend information).
;''Arguments''
== Example ==
 
<!-- begin code -->
:;None
 
----
;''Returns''
 
:(Number numberOfFriends)
 
:;numberOfFriends : The number of friends.
 
----
;''Example''
  DEFAULT_CHAT_FRAME:AddMessage("I've got " .. GetNumFriends() .. " friend(s)");
  DEFAULT_CHAT_FRAME:AddMessage("I've got " .. GetNumFriends() .. " friend(s)");
 
<!-- end code -->
;''Result''
==== Result ====
 
:Displays "I've got 3 friend(s)"
Prints a message in the default chat frame.
 
----
;''Description''
 
: Returns number of friends.
 
----
----
__NOTOC__
{{Template:WoW API}}
{{Template:WoW API}}
[[Category:API Functions|GetNumFriends]]
[[Category:API Friend Functions|GetNumFriends]]
[[Category:API Friend Functions|GetNumFriends]]

Revision as of 19:01, 11 September 2005

GetNumFriends - Documentation by jpopcenter

Returns how many friends you have.

numberOfFriends = GetNumFriends()

Parameters

Returns

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

Example

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

Result

Displays "I've got 3 friend(s)"

Template:WoW API