{"name":"diaryRecordNull","title":"diaryRecordNull","type":"command","url":"https://community.bistudio.com/wiki/diaryRecordNull","revid":340843,"updated":"2023-05-10T14:37:02Z","groups":["Briefing","Variables"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","description":"A non-existent Diary Record. To compare non-existent objects use isNull or isEqualTo:\n\n```sqf\ndiaryRecordNull == diaryRecordNull;        // false\nisNull diaryRecordNull;                        // true\ndiaryRecordNull isEqualTo diaryRecordNull;    // true\n```\n\n> [!NOTE]\n> Before Arma 3 v2.00, isNull did not work with the diary record type and diaryRecordNull did not exist.\n>\n> In order to verify a null record, it is possible to create a variable and compare against it:\n>\n> ```sqf\n> private _diaryRecordNull = objNull createDiaryRecord [];\n> private _createdRecord = player createDiaryRecord [\"Diary\", [\"Title\", \"Description\"]];\n> if (_createdRecord isEqualTo _diaryRecordNull) then { hint \"Failed\"; };\n> ```","syntaxes":[{"syntax":"diaryRecordNull","params":[],"returns":{"type":"Diary Record","type_expr":"Diary Record"},"form":"nullary"}],"examples":[{"code":["isNull diaryRecordNull; // true"]},{"code":["isNull (objNull createDiaryRecord [\"Diary\", [\"Title\", \"Text\"]]); // true - objNull cannot take diary records"]},{"code":["str diaryRecordNull; // \"No diary record\""]},{"text":"```sqf\nprivate _diaryRecord = diaryRecordNull;\nif (damage player > 0.5) then\n{\n    _diaryRecord = player createDiaryRecord [\"Diary\", [\"Heal yourself\", \"Ask a medic\"]];\n};\n\nif (not isNull _diaryRecord) then { hint \"Diary record added.\"; };\n```","code":["private _diaryRecord = diaryRecordNull;\nif (damage player > 0.5) then\n{\n\t_diaryRecord = player createDiaryRecord [\"Diary\", [\"Heal yourself\", \"Ask a medic\"]];\n};\n\nif (not isNull _diaryRecord) then { hint \"Diary record added.\"; };"]}],"see_also":["objNull","controlNull","displayNull","grpNull","locationNull","taskNull","teamMemberNull","scriptNull","configNull","typeName","isNull"]}