API GetNumFriends

104,549pages on
this wiki
Add New Page
Add New Page Talk0
WoW API < GetNumFriends

Returns how many friends you have.

numberOfFriends, onlineFriends = GetNumFriends()

Parameters Edit

Returns Edit

Integer - The number of friends you have (i.e. the highest valid friend index you can use to get friend information).
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.

Also on Fandom

Random Wiki