WoW:API GetNumFriends: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
({{wowapi}})
Line 1: Line 1:
<center>'''GetNumFriends''' - ''Documentation by jpopcenter''</center>
{{wowapi}} __NOTOC__
 
Returns how many friends you have.
Returns how many friends you have.
numberOfFriends = GetNumFriends()


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


:;numberOfFriends : Integer - The number of friends you have (i.e. the highest valid friend index you can use to get friend information).
== Example ==
== Example ==
<!-- begin code -->
  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)"
Displays the number of friends you currently have in the default chat frame.
 
----
{{WoW API}}
__NOTOC__

Revision as of 20:49, 25 December 2006

WoW API < GetNumFriends

Returns how many friends you have.

numberOfFriends = GetNumFriends()

Parameters

Returns

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 the number of friends you currently have in the default chat frame.