diaryRecordNull: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|seealso= *\[\[([^ ]+)\]\], \[\[([^ ]+)\]\]" to "|seealso= $1 $2")
m (Some wiki formatting)
Line 17: Line 17:
|r1= [[Diary Record]]
|r1= [[Diary Record]]


|x1= <code>[[isNull]] [[diaryRecordNull]]; {{cc|true}}</code>
|x1= <sqf>isNull diaryRecordNull; // true</sqf>


|x2= <code>[[isNull]] ([[objNull]] [[createDiaryRecord]] ["Diary", ["Title", "Text"]]); {{cc|true - [[objNull]] cannot take diary records}}</code>
|x2= <sqf>isNull (objNull createDiaryRecord ["Diary", ["Title", "Text"]]); // true - objNull cannot take diary records</sqf>


|x3= <code>[[str]] [[diaryRecordNull]]; {{cc|"No diary record"}}</code>
|x3= <sqf>str diaryRecordNull; // "No diary record"</sqf>


|x4= <code>[[private]] _diaryRecord = [[diaryRecordNull]];
|x4= <sqf>
[[if]] ([[damage]] [[player]] > 0.5) [[then]]
private _diaryRecord = diaryRecordNull;
if (damage player > 0.5) then
{
{
_diaryRecord = [[player]] [[createDiaryRecord]] ["Diary", ["Heal yourself", "Ask a medic"]];
_diaryRecord = player createDiaryRecord ["Diary", ["Heal yourself", "Ask a medic"]];
};
};
[[if]] ([[not]] [[isNull]] _diaryRecord) [[then]] { [[hint]] "Diary record added."; };</code>
if (not isNull _diaryRecord) then { hint "Diary record added."; };
</sqf>


|seealso= [[objNull]] [[controlNull]] [[displayNull]] [[grpNull]] [[locationNull]] [[taskNull]] [[teamMemberNull]] [[scriptNull]] [[configNull]] [[typeName]] [[isNull]]
|seealso= [[objNull]] [[controlNull]] [[displayNull]] [[grpNull]] [[locationNull]] [[taskNull]] [[teamMemberNull]] [[scriptNull]] [[configNull]] [[typeName]] [[isNull]]
}}
}}

Revision as of 11:39, 4 May 2022

Hover & click on the images for description

Description

Description:
A non-existent Diary Record. To compare non-existent objects use isNull or isEqualTo:
Groups:
BriefingVariables

Syntax

Syntax:
diaryRecordNull
Return Value:
Diary Record

Examples

Example 1:
isNull diaryRecordNull; // true
Example 2:
isNull (objNull createDiaryRecord ["Diary", ["Title", "Text"]]); // true - objNull cannot take diary records
Example 3:
str diaryRecordNull; // "No diary record"
Example 4:
private _diaryRecord = diaryRecordNull; if (damage player > 0.5) then { _diaryRecord = player createDiaryRecord ["Diary", ["Heal yourself", "Ask a medic"]]; }; if (not isNull _diaryRecord) then { hint "Diary record added."; };

Additional Information

See also:
objNull controlNull displayNull grpNull locationNull taskNull teamMemberNull scriptNull configNull typeName isNull

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