WoW:API UnitName: Difference between revisions

57 bytes removed ,  24 August 2006
No edit summary
Line 19: Line 19:
<!-- List each return value, together with its type -->
<!-- List each return value, together with its type -->
:;name : String - The name of the specified unit.
:;name : String - The name of the specified unit.
 
:;realm : String - The realm the specified unit is from. If from your own realm, then realm == nil (but the 2nd return value is still there). This is as of 1.12


== Example ==
== Example ==
Line 42: Line 42:
: UnitName("player") (or any other unit) will return "Unknown Entity" (Actually the value of the UNKNOWNOBJECT global) if called before the unit in question has been fully loaded into the world.
: UnitName("player") (or any other unit) will return "Unknown Entity" (Actually the value of the UNKNOWNOBJECT global) if called before the unit in question has been fully loaded into the world.


: '''In the upcoming patch 1.12, it seems that UnitName() returns two values: unit-name and server-name. The second value is only returned when used on a player from another server in a (cross-server) battleground.'''
 
[[Category:World of Warcraft API]]
[[Category:World of Warcraft API]]
Anonymous user