Arma 3 Scripting

Command in Briefing, Variables

diaryRecordNull

Also available as Markdown and JSON, or read the original wiki page.

Description

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

diaryRecordNull == diaryRecordNull;        // false
isNull diaryRecordNull;                        // true
diaryRecordNull isEqualTo diaryRecordNull;    // true

Note

Before Arma 3 v2.00, isNull did not work with the diary record type and diaryRecordNull did not exist. In order to verify a null record, it is possible to create a variable and compare against it:

private _diaryRecordNull = objNull createDiaryRecord [];
private _createdRecord = player createDiaryRecord ["Diary", ["Title", "Description"]];
if (_createdRecord isEqualTo _diaryRecordNull) then { hint "Failed"; };

Syntax

diaryRecordNull

Returns: 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."; };

See also

objNull · controlNull · displayNull · grpNull · locationNull · taskNull · teamMemberNull · scriptNull · configNull · typeName · isNull