createDiaryLink: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\|x([0-9])= *<code>([^<]*)<\/code>" to "|x$1= <sqf>$2</sqf>") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
Line 27: | Line 27: | ||
|r1= [[String]] - Empty string or a string similar to the result of {{ic|[[format]] ["<log subject{{=}}""%1"" record{{=}}""%2"">%3</log>", subject, processedRecordId, text]}} | |r1= [[String]] - Empty string or a string similar to the result of {{ic|[[format]] ["<log subject{{=}}""%1"" record{{=}}""%2"">%3</log>", subject, processedRecordId, text]}} | ||
|x1= <sqf>_diaryRec1 = player createDiaryRecord ["Diary", ["Record 1", "We can not refer to the next record because it does not exist yet."]]; | |x1= <sqf> | ||
_diaryRec1 = player createDiaryRecord ["Diary", ["Record 1", "We can not refer to the next record because it does not exist yet."]]; | |||
_diaryRec2 = player createDiaryRecord ["Diary", ["Record 2", "Go to " + createDiaryLink ["Diary", _diaryRec1, "record 1"]]]; | _diaryRec2 = player createDiaryRecord ["Diary", ["Record 2", "Go to " + createDiaryLink ["Diary", _diaryRec1, "record 1"]]]; | ||
_diaryRec3 = player createDiaryRecord ["Diary", ["Record 3", "Go to " + createDiaryLink ["Diary", _diaryRec2, "record 2"]]];</sqf> | _diaryRec3 = player createDiaryRecord ["Diary", ["Record 3", "Go to " + createDiaryLink ["Diary", _diaryRec2, "record 2"]]]; | ||
</sqf> | |||
|x2= In this example, one can go to any next record. | |x2= In this example, one can go to any next record. | ||
< | <sqf> | ||
TAG_fnc_processDiaryLink = { | |||
processDiaryLink createDiaryLink ["Diary", _this, ""]; | |||
}; | }; | ||
DiaryRec1 = | DiaryRec1 = player createDiaryRecord ["Diary", ["Record 1", | ||
"Go to <execute expression='DiaryRec2 call TAG_fnc_processDiaryLink'>Record 2</execute>" | "Go to <execute expression='DiaryRec2 call TAG_fnc_processDiaryLink'>Record 2</execute>" | ||
]]; | ]]; | ||
DiaryRec2 = | DiaryRec2 = player createDiaryRecord ["Diary", ["Record 2", | ||
"Go to <execute expression='DiaryRec3 call TAG_fnc_processDiaryLink'>Record 3</execute>" | "Go to <execute expression='DiaryRec3 call TAG_fnc_processDiaryLink'>Record 3</execute>" | ||
]]; | ]]; | ||
DiaryRec3 = | DiaryRec3 = player createDiaryRecord ["Diary", ["Record 3", | ||
"Go to <execute expression='DiaryRec1 call TAG_fnc_processDiaryLink'>Record 1</execute>" | "Go to <execute expression='DiaryRec1 call TAG_fnc_processDiaryLink'>Record 1</execute>" | ||
]]; | ]]; | ||
</ | </sqf> | ||
|seealso= [[processDiaryLink]] [[createDiaryRecord]] [[createDiarySubject]] [[diarySubjectExists]] [[setDiaryRecordText]] | |seealso= [[processDiaryLink]] [[createDiaryRecord]] [[createDiarySubject]] [[diarySubjectExists]] [[setDiaryRecordText]] | ||
}} | }} |
Revision as of 12:22, 14 May 2022
Description
- Description:
- Creates a link to the given diary entry.
- Groups:
- Briefing
Syntax
- Syntax:
- createDiaryLink [subject, record, text]
- Parameters:
- subject: String
- record: Object, Task or Diary Record
- text: String
- Return Value:
- String - Empty string or a string similar to the result of
format ["<log subject=""%1"" record=""%2"">%3</log>", subject, processedRecordId, text]
Examples
- Example 1:
- _diaryRec1 = player createDiaryRecord ["Diary", ["Record 1", "We can not refer to the next record because it does not exist yet."]]; _diaryRec2 = player createDiaryRecord ["Diary", ["Record 2", "Go to " + createDiaryLink ["Diary", _diaryRec1, "record 1"]]]; _diaryRec3 = player createDiaryRecord ["Diary", ["Record 3", "Go to " + createDiaryLink ["Diary", _diaryRec2, "record 2"]]];
- Example 2:
- In this example, one can go to any next record.
TAG_fnc_processDiaryLink = { processDiaryLink createDiaryLink ["Diary", _this, ""]; }; DiaryRec1 = player createDiaryRecord ["Diary", ["Record 1", "Go to <execute expression='DiaryRec2 call TAG_fnc_processDiaryLink'>Record 2</execute>" ]]; DiaryRec2 = player createDiaryRecord ["Diary", ["Record 2", "Go to <execute expression='DiaryRec3 call TAG_fnc_processDiaryLink'>Record 3</execute>" ]]; DiaryRec3 = player createDiaryRecord ["Diary", ["Record 3", "Go to <execute expression='DiaryRec1 call TAG_fnc_processDiaryLink'>Record 1</execute>" ]];
Additional Information
- See also:
- processDiaryLink createDiaryRecord createDiarySubject diarySubjectExists setDiaryRecordText
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