WoW:API TargetByName: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
m (Finished the experiment)
Line 19: Line 19:
;''Details''
;''Details''


: It's probably worth testing what happens if the name isn't close by, or doesn't exist, or is an enemy or NPC, etc. -- [[User:Flickering|Flickering]] 14:06, 28 Dec 2004 (EST)
: 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, TargetByName seems to pick the closest match from characters nearby. It is unknown if TargetByName returns any value if succesful or not. --[[User:Nightspark|Nightspark]] 20:29, 7 Jan 2005 (EST)
: 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)
 


----
----
{{Template:WoW API}}
{{Template:WoW API}}
[[Category:API Targetting Functions|TargetByName]]
[[Category:API Targetting Functions|TargetByName]]

Revision as of 01:37, 8 January 2005

TargetByName -Documentation by Flickering-
TargetByName("name");

Target a player by their name.


Arguments
("name")
name
String - The API TYPE PlayerName name of the player to target.

Example
TargetByName("Norrin");

Details
If the user isn't nearby or doesn't exist, TargetByName seems to pick the closest match from characters nearby. --Nightspark 20:29, 7 Jan 2005 (EST)
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. -- Flickering 20:37, 7 Jan 2005 (EST)



Template:WoW API