isNull: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "[[Category:Scripting_Commands_Take_On_Helicopters" to "[[Category:Scripting Commands Take On Helicopters")
m (Text replacement - "[[Category:Scripting Commands ArmA|" to "[[Category:Scripting Commands Armed Assault|")
Line 47: Line 47:
[[Category:Scripting Commands OFP 1.96|ISNULLOBJ]]
[[Category:Scripting Commands OFP 1.96|ISNULLOBJ]]
[[Category:Scripting Commands OFP 1.46|ISNULLOBJ]]
[[Category:Scripting Commands OFP 1.46|ISNULLOBJ]]
[[Category:Scripting Commands ArmA|ISNULLOBJ]]
[[Category:Scripting Commands Armed Assault|ISNULLOBJ]]
[[Category:Command_Group:_Object_Information|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Object_Information|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Variables|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Variables|{{uc:{{PAGENAME}}}}]]

Revision as of 20:16, 3 June 2020

Hover & click on the images for description

Description

Description:
Checks whether the tested item is Null.
Which null type the item has to be equal to depends on the type of game entity tested:
Note: A test via == does not work, because, for example, objNull is not equal to anything, not even to itself. Use isEqualTo.
Groups:
Uncategorised

Syntax

Syntax:
isNull entity
Parameters:
entity: Object, Control, Display, Group (or Location, Task since ARMA 2 (or Script since Arma 3 1.29.127075))
Return Value:
Boolean

Examples

Example 1:
if (isNull obj) then {hint "doesn't exist";};

Additional Information

See also:
controlNulldisplayNullgrpNulllocationNullobjNulltaskNullteamMemberNullscriptNullconfigNulltypeName

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section

Posted on December 9, 2015 - 11:29 (UTC)
Commy2
isNull does not work with the TEAM_MEMBER type. Use this instead: _tmember isEqualTo teamMemberNull
Posted on December 9, 2015 - 11:38 (UTC)
Commy2
The note in the description does not apply to the CONFIG type, probably due to backwards compatibility.
configNull == configNull -> true