Quantcast
WoWInterface - View Single Post - How to check if Unit target is player
View Single Post
10-20-18, 10:49 AM   #2
Tim
A Frostmaul Preserver
 
Tim's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 279
I really haven't delved into nameplate stuff and really have no intentions of doing so. However, you're trying to use an incorrect identifier for the UnitIsPlayer function. That function only accepts identifiers of the unit (ie: player, target, pet, etc).

Code:
if UnitIsPlayer("target") then
   -- color some stuff
else
   -- color some stuff
end
https://wow.gamepedia.com/API_UnitIsPlayer
https://wow.gamepedia.com/UnitId
__________________
AddOns: Tim @ WoWInterface
Characters: Warrior, Shaman, DH, Mage, Pally
Current PC Setup: PCPartPicker List