createDiaryLink: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ |()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}") |
(formatting) |
||
Line 1: | Line 1: | ||
{{RV|type=command | {{RV|type=command | ||
| arma2 | |game1= arma2 | ||
|1.00 | |version1= 1.00 | ||
|game2= arma2oa | |||
|version2= 1.51 | |||
|game3= tkoh | |||
|version3= 1.00 | |||
|game4= arma3 | |||
|version4= 0.50 | |||
|gr1= Briefing | |gr1= Briefing | ||
| Creates a link to the section of diary given by subject. Record is selected based on given | |descr= Creates a link to the section of diary given by subject. Record is selected based on given object, diary record or task. | ||
| | |s1= '''createDiaryLink''' [subject, record, text] | ||
| | |p1= subject: [[String]] | ||
| | |p2= record: [[Object]], [[Task]] or [[Diary Record]] | ||
| | |p3= text: [[String]] | ||
| [[String]] - empty string | |r1= [[String]] - empty string {{ic|""}} or string in {{ic|<tt>[[format]] ["<log subject<nowiki>=</nowiki>""%1"" record<nowiki>=</nowiki>""%2"">%3</log>", subject, processedRecordId, text]}} | ||
|x1= <code>_link <nowiki>=</nowiki> [[createDiarySubject]] ["Group", [[player]], "Player"]</code> | |x1= <code>_link <nowiki>=</nowiki> [[createDiarySubject]] ["Group", [[player]], "Player"]</code> | ||
Line 42: | Line 52: | ||
</code> | </code> | ||
|seealso= [[processDiaryLink]] | |seealso= [[processDiaryLink]] [[createDiaryRecord]] [[createDiarySubject]] [[diarySubjectExists]] [[setDiaryRecordText]] | ||
}} | }} | ||
Revision as of 14:00, 4 March 2021
Description
- Description:
- Creates a link to the section of diary given by subject. Record is selected based on given object, diary record or task.
- 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 string informat ["<log subject=""%1"" record=""%2"">%3</log>", subject, processedRecordId, text]
Examples
- Example 1:
_link = createDiarySubject ["Group", player, "Player"]
- Example 2:
diaryRec1 = player createDiaryRecord ["diary", ["Record 1", "We can't refer to next record (("]]; 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 3:
funcProcessDiaryLink = { processDiaryLink createDiaryLink ["diary", _this, ""]; }; diaryRec1 = player createDiaryRecord ["diary", ["Record 1", "In this example, we can go to any next record: go to <execute expression='diaryRec2 call funcProcessDiaryLink'>Record 2</execute>" ]]; diaryRec2 = player createDiaryRecord ["diary", ["Record 2", "Go to <execute expression='diaryRec3 call funcProcessDiaryLink'>Record 3</execute>" ]]; diaryRec3 = player createDiaryRecord ["diary", ["Record 3", "Go to <execute expression='diaryRec1 call funcProcessDiaryLink'>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