View Single Post
05/10/14, 05:06 PM   #1
morton.bia
Join Date: Apr 2014
Posts: 4
unitTag returning int

Im trying to test the unitTag to make sure its player so I have
Code:
function expReceived (unitTag, exp, maxExp, reason)
  if ( unitTag ~= 'player' ) then
    d(unitTag)
    return
  end
end

 EVENT_MANAGER:RegisterForEvent("test" , EVENT_EXPERIENCE_UPDATE, expReceived)
I have the d(unitTag) to see what im getting when its not player. Everytime i get exp im getting a number as the unittag and my check is returning true when it should return false. I even checked against other addons and the other ones work but mine doesnt want to return correctly.

This is my first addon so any help would be appreciated
  Reply With Quote