WoW:API UnitIsPlayer: Difference between revisions
Jump to navigation
Jump to search
m (If the return values are true or nil, then the second half of the IF block will never fire, so I removed it. Could have changed it to "==", but then there would be two calls to UnitIsPlayer()) |
(Result changed in 6.0.3) |
||
Line 13: | Line 13: | ||
;''Returns'' | ;''Returns'' | ||
:''True/ | :''True/False'' | ||
---- | ---- | ||
Line 24: | Line 24: | ||
--Do something else | --Do something else | ||
end | end | ||
Seems like in 6.0.3 it returns True/False |
Revision as of 10:57, 14 December 2014
← WoW API < UnitIsPlayer
UnitIsPlayer(UnitId)
Determines if the unit is a player. It is important to note that it returns nil rather than false, nil is treated like false for most operations but it is *not* a proper boolean.
- Arguments
- Returns
- True/False
- Example
if (UnitIsPlayer(UnitId)) then --Do something here else --Do something else end
Seems like in 6.0.3 it returns True/False