WoW API: GetNumFriends

Revision as of 04:46, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API GetNumFriends to API GetNumFriends without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

WoW API < GetNumFriends

Returns how many friends you have.

numberOfFriends, onlineFriends = GetNumFriends()

ParametersEdit

ReturnsEdit

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.

ExampleEdit

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

ResultEdit

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