WoW:API GetFriendInfo: Difference between revisions
Jump to navigation
Jump to search
GetFriendInfo -Documentation by IonDefender-
No edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
<center>'''GetFriendInfo''' ''-Documentation by [[user:Author|IonDefender]]-''</center> | <center>'''GetFriendInfo''' ''-Documentation by [[user:Author|IonDefender]]-''</center> | ||
Gets the name, level, class, and location of your friends | |||
name, level, class, area, connected = GetFriendInfo(friendIndex); | name, level, class, area, connected = GetFriendInfo(friendIndex); | ||
== Parameters == | |||
=== Arguments === | |||
:(friendIndex) | |||
:;friendIndex : Integer - Index of friend (Does not appear to be the exact order they appear in the friends list as online friends are sorted to the top but always have the same index) | |||
; | |||
=== Returns === | |||
:name, level, class, area, connected | :name, level, class, area, connected | ||
:;name : String - Friends name. | :;name : String - Friends name. | ||
:;level : | :;level : Integer - Friends level. If unknown returns 0, but sometimes 1 (can someone else test this) | ||
::looks like this is 1 when arg1 is out of bounds (e.g., 0) --[[User:Topaz|Topaz]] 22:37, 12 Mar 2005 (EST) | ::looks like this is 1 when arg1 is out of bounds (e.g., 0) --[[User:Topaz|Topaz]] 22:37, 12 Mar 2005 (EST) | ||
:;class : String - Friends class. If unknown returns "Unknown" | :;class : String - Friends class. If unknown returns "Unknown" | ||
Line 27: | Line 22: | ||
:;connected : Boolean - Whether or not the friend is currently online | :;connected : Boolean - Whether or not the friend is currently online | ||
== Example == | |||
local num1, num2, num3, num4 = GetFriendInfo(1); | local num1, num2, num3, num4 = GetFriendInfo(1); | ||
DEFAULT_CHAT_FRAME:AddMessage("Your friend "..num1.." (The level "..num2.." "..num3..") is in "..num4.."."); | DEFAULT_CHAT_FRAME:AddMessage("Your friend "..num1.." (The level "..num2.." "..num3..") is in "..num4.."."); | ||
====Result==== | |||
Your friend Bill (The level 99 Leprechaun) is in Neverland. | Your friend Bill (The level 99 Leprechaun) is in Neverland. | ||
---- | ---- | ||
__NOTOC__ | |||
{{Template:WoW API}} | {{Template:WoW API}} | ||
[[Category:API Friend Functions|GetFriendInfo]] | |||
[[Category:API Functions| |
Revision as of 05:08, 25 August 2005
Gets the name, level, class, and location of your friends
name, level, class, area, connected = GetFriendInfo(friendIndex);
Parameters
Arguments
- (friendIndex)
- friendIndex
- Integer - Index of friend (Does not appear to be the exact order they appear in the friends list as online friends are sorted to the top but always have the same index)
Returns
- name, level, class, area, connected
- name
- String - Friends name.
- level
- Integer - Friends level. If unknown returns 0, but sometimes 1 (can someone else test this)
- looks like this is 1 when arg1 is out of bounds (e.g., 0) --Topaz 22:37, 12 Mar 2005 (EST)
- class
- String - Friends class. If unknown returns "Unknown"
- area
- String - Friends current location. If unknown returns "Unknown"
- connected
- Boolean - Whether or not the friend is currently online
Example
local num1, num2, num3, num4 = GetFriendInfo(1); DEFAULT_CHAT_FRAME:AddMessage("Your friend "..num1.." (The level "..num2.." "..num3..") is in "..num4..".");
Result
Your friend Bill (The level 99 Leprechaun) is in Neverland.