Navigation menu

WoW:API TargetByName: Difference between revisions

Jump to navigation Jump to search
m
Move page script moved page API TargetByName to WoW:API TargetByName without leaving a redirect
m (Finished the experiment)
m (Move page script moved page API TargetByName to WoW:API TargetByName without leaving a redirect)
 
(6 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<center>'''TargetByName''' ''-Documentation by [[user:Flickering|Flickering]]-''</center>
{{wowapi}} __NOTOC__
{{removedapi|2.0.1|For alternatives, try [[API_SecureTemplates|Secure Templates]] or the /target}}
 
Target a player by their name.
 
TargetByName("name", exactMatch);


TargetByName("name");


Target a player by their name.
== Parameters ==
===Arguments===


----
:("name", exactMatch)
;''Arguments''


:("name")
:;name : String - The [[API TYPE PlayerName|name]] of the player to target.
:;name : String - The [[API TYPE PlayerName]] name of the player to target.
:;exactMatch : Boolean


----
== Example ==
;''Example''


  TargetByName("Norrin");
  TargetByName("Norrin", true);


----
== Details ==
;''Details''


: If the user isn't nearby or doesn't exist, TargetByName seems to pick the closest match from characters nearby. --[[User:Nightspark|Nightspark]] 20:29, 7 Jan 2005 (EST)
: If the user isn't nearby or doesn't exist, and '''exactMatch''' isn't set, TargetByName picks the closest match from characters nearby.
: If there is no close match available then an error message is displayed (Error event?) and the target is left unchanged. There is no return value from this method so the only way to check for success is see what the target ended up as afterwards. -- [[User:Flickering|Flickering]] 20:37, 7 Jan 2005 (EST)


: If '''exactMatch''' is set, TargetByName can also target party members even if they are out of visible range.


----
: If there is no close match available then an error message is displayed (Error event?) and the target is left unchanged. There is no return value from this method so the only way to check for success is see what the target ended up as afterwards.
{{Template:WoW API}}
[[Category:API Targetting Functions|TargetByName]]
Anonymous user