WoW:API UnitIsPlayer: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (Move page script moved page API UnitIsPlayer to API UnitIsPlayer without leaving a redirect) |
||
(5 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{wowapi}} | |||
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args --> | <!-- List return values and arguments as well as function name, follow Blizzard usage convention for args --> | ||
UnitIsPlayer(UnitId) | UnitIsPlayer(UnitId) | ||
Determines if the unit is a player. | 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'' | ;''Arguments'' | ||
: | :''[[API_TYPE_UnitId|UnitId]]'' | ||
---- | ---- | ||
;''Returns'' | ;''Returns'' | ||
: | :''True/False'' | ||
---- | ---- | ||
Line 20: | Line 21: | ||
if (UnitIsPlayer(UnitId)) then | if (UnitIsPlayer(UnitId)) then | ||
--Do something here | --Do something here | ||
else | |||
--Do something | --Do something else | ||
end | end | ||
Seems like in 6.0.3 it returns True/False | |||
Latest revision as of 04:47, 15 August 2023
← 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