diaryRecordNull: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\{\{cc\|([^} ]*)\}\}" to "// $1") |
Lou Montana (talk | contribs) (Some wiki formatting) |
||
Line 9: | Line 9: | ||
|descr= A non-existent [[Diary Record]]. To compare non-existent objects use [[isNull]] or [[isEqualTo]]: | |descr= A non-existent [[Diary Record]]. To compare non-existent objects use [[isNull]] or [[isEqualTo]]: | ||
<sqf> | |||
diaryRecordNull == diaryRecordNull; // false | |||
isNull diaryRecordNull; // true | |||
diaryRecordNull isEqualTo diaryRecordNull; // true | |||
</sqf> | |||
{{Feature|informative| | |||
Before {{arma3}} 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: | |||
<sqf> | |||
private _diaryRecordNull = objNull createDiaryRecord []; | |||
private _createdRecord = player createDiaryRecord ["Diary", ["Title", "Description"]]; | |||
if (_createdRecord isEqualTo _diaryRecordNull) then { hint "Failed"; }; | |||
</sqf> | |||
}} | |||
|s1= [[diaryRecordNull]] | |s1= [[diaryRecordNull]] | ||
Line 29: | Line 41: | ||
_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."; }; | if (not isNull _diaryRecord) then { hint "Diary record added."; }; | ||
</sqf> | </sqf> |
Latest revision as of 15:37, 10 May 2023
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:
- Example 2:
- isNull (objNull createDiaryRecord ["Diary", ["Title", "Text"]]); // true - objNull cannot take diary records
- Example 3:
- Example 4:
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