WoW:API UnitName: Difference between revisions

No edit summary
Line 17: Line 17:
=== Returns ===
=== Returns ===
<!-- List each return value, together with its type -->
<!-- List each return value, together with its type -->
:;name : String - The name of the specified unit, "nil" if not applicable (e.g., if the specified unit is "target" but the player has no target selected).
:;name
:;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
:: String - The name of the specified unit, "nil" if not applicable (e.g., if the specified unit is "target" but the player has no target selected).
:;realm
:: String - The realm the specified unit is from. For "player" returns nil, for any other character on your own realm returns an empty string. This is as of 1.12


== Example ==
== Example ==
Anonymous user