VoidvectorBot@legacy41580961 (talk | contribs) m (Robot: converting/fixing HTML) |
TinyEditor@legacy41577754 (talk | contribs) No edit summary |
||
Line 4: | Line 4: | ||
UnitIsPlayer(UnitId) |
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. |
||
− | Determines if the unit is a player. |
||
---- |
---- |
||
;''Arguments'' |
;''Arguments'' |
||
Line 13: | Line 13: | ||
;''Returns'' |
;''Returns'' |
||
− | :''True/ |
+ | :''True/nil'' |
---- |
---- |
Revision as of 16:58, 9 January 2008
Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
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/nil
- Example
if (UnitIsPlayer(UnitId)) then --Do something here elseif (UnitIsPlayer(UnitId) ~= nil) then --Do something here end