isNull: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
(scriptNull)
Line 10: Line 10:


|  Checks whether the tested item is Null.<br>
|  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>
Which null type the item has to be equal to depends on the type of game entity tested:<br>
* [[Object]]s -> [[objNull]]
* [[Object]]s -> [[objNull]]
* [[Control]]s -> [[controlNull]]
* [[Control]]s -> [[controlNull]]
Line 19: Line 19:
* [[Script]]s -> [[scriptNull]] (since Arma 3 1.29.127075)
* [[Script]]s -> [[scriptNull]] (since Arma 3 1.29.127075)


Note: A test via <nowiki>==</nowiki> does not work, because, for example, [[objNull]] is not equal to anything, not even to itself. |= Description
Note: A test via <nowiki>==</nowiki> does not work, because, for example, [[objNull]] is not equal to anything, not even to itself. Use [[isEqualTo]]. |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''isNull''' obj |= Syntax
| '''isNull''' entity |= Syntax


|p1 = obj: [[Object]], [[Control]], [[Display]], [[Group]] (or [[Location]], [[Task]] since ARMA 2) |= Parameter 1
|p1 = entity: [[Object]], [[Control]], [[Display]], [[Group]] (or [[Location]], [[Task]] since ARMA 2 (or [[Script]] since Arma 3 1.29.127075)) |= Parameter 1


| [[Boolean]] |= Return value
| [[Boolean]] |= Return value
Line 31: Line 31:
|x1 = <code>[[if]] ([[isNull]] obj) [[then]] {[[hint]] "doesn't exist";};</code>
|x1 = <code>[[if]] ([[isNull]] obj) [[then]] {[[hint]] "doesn't exist";};</code>


| [[controlNull]], [[displayNull]], [[grpNull]], [[locationNull]], [[objNull]], [[taskNull]], [[teamMemberNull]] |= See also
| [[controlNull]], [[displayNull]], [[grpNull]], [[locationNull]], [[objNull]], [[taskNull]], [[teamMemberNull]], [[scriptNull]]|= See also


}}
}}

Revision as of 21:00, 5 September 2014

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:
controlNulldisplayNullgrpNulllocationNullobjNulltaskNullteamMemberNullscriptNull

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