WoW:API UnitName

From AddOn Studio
Revision as of 03:51, 12 December 2004 by WoWWiki>WoWWiki-Octon
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
UnitName -Documentation by octon-

Returns the name of the specified unit.


Arguments
(String unit)
arg1
The unit to query (e.g. "player")

Returns
name
name
The name of the specified unit as a string.

Example
local playerName = UnitName("player");
ChatFrame1:AddMessage('Hi my name is: ' .. playerName);
Result
Prints the player's name to the chat frame as
'Hi my name is: Octon'.  

Description
Returns the name of the specified unit.

Template:WoW API