isNull: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Removed wrong category)
(merged variations)
Line 1: Line 1:
'''isNull''' can refer to these scripting commands:
{{Command|= Comments
*[[isNull control]]
____________________________________________________________________________________________
*[[isNull display]]
*[[isNull grp]]
*[[isNull obj]]


| ofp |= Game name


{{Disambig}}
|1.00|= Game version
 
|arg= global |= Arguments in MP
____________________________________________________________________________________________
 
|  Checks whether the tested item is Null.<br>
Which null type the item has to be equal to depends on the type of object tested:<br>
* [[Object]]s -> [[objNull]]
* [[Control]]s -> [[controlNull]]
* [[Display]]s -> [[displayNull]]
* [[Group]]s -> [[grpNull]]
* [[Location]]s -> [[locationNull_(VBS2)|locationNull]] (only VBS2)
 
Note: A test via <nowiki>==</nowiki> does not work, because, for example, [[objNull]] is not equal to anything, not even to itself. |= Description
____________________________________________________________________________________________
 
| '''isNull''' obj |= Syntax
 
|p1 = obj: [[Object]], [[Control]], [[Display]], [[Group]] (or [[Location]], for VBS2 1.24 and higher) |= Parameter 1
 
| [[Boolean]] |= Return value
____________________________________________________________________________________________
|x1 = <code>if (isNull obj) then {hint "doesn't exist"} </code>
 
| [[controlNull]], [[displayNull]], [[grpNull]], [[locationNull_(VBS2)|locationNull]] |= See also
 
}}
 
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
 
<!-- Note Section END -->
</dl>
 
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|ISNULLOBJ]]
[[Category:Scripting Commands OFP 1.96|ISNULLOBJ]]
[[Category:Scripting Commands OFP 1.46|ISNULLOBJ]]
[[Category:Scripting Commands ArmA|ISNULLOBJ]]
[[Category:Command_Group:_Object_Information|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Variables|{{uc:{{PAGENAME}}}}]]

Revision as of 13:55, 6 May 2009

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 object tested:
Note: A test via == does not work, because, for example, objNull is not equal to anything, not even to itself.
Groups:
Uncategorised

Syntax

Syntax:
isNull obj
Parameters:
obj: Object, Control, Display, Group (or Location, for VBS2 1.24 and higher)
Return Value:
Boolean

Examples

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

Additional Information

See also:
controlNulldisplayNullgrpNulllocationNull

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