isFinal: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) (Fix example) |
BrettMayson (talk | contribs) mNo edit summary |
||
Line 10: | Line 10: | ||
|s1= [[isFinal]] variable | |s1= [[isFinal]] variable | ||
|p1= | |p1= variable: [[Code]], [[String]], {{GVI|arma3|2.14|size= 0.75}} [[Array]] or [[HashMap]] | ||
* [[Code]] | * [[Code]] | ||
* [[String]] - the name of the variable holding [[Code]] | * [[String]] - the name of the variable holding [[Code]] |
Latest revision as of 03:07, 27 November 2023
Description
- Description:
- Checks if Code or a variable was compiled final with compileFinal.
- Groups:
- Variables
Syntax
- Syntax:
- isFinal variable
- Parameters:
- variable: Code, String, 2.14 Array or HashMap
- Code
- String - the name of the variable holding Code
- 2.14 Array - an array that is a HashMapKey, a trigger's thisList array, made final with compileFinal etc.
- 2.14 HashMap - a hashmap made final with compileFinal
- Return Value:
- Boolean - true if final, false if not
Examples
- Example 1:
- private _myCode = compileFinal "a = a + 1"; systemChat format ["isFinal ""_myCode"": %1", isFinal "_myCode"]; // true systemChat format ["isFinal _myCode: %1", isFinal _myCode]; // true systemChat format ["isFinal some code: %1", isFinal { hint "Hello there" }]; // false private _myArray1 = list _myTrigger; systemChat format ["isFinal _myArray1: %1", isFinal _myArray1]; // true private _myArray2 = [1, 2, 3]; systemChat format ["isFinal _myArray2: %1", isFinal _myArray2]; // false private _myHashMap = compileFinal createHashMap; systemChat format ["isFinal _myHashMap: %1", isFinal _myHashMap]; // true
- Example 2:
- Avoid .rpt's overwrite warnings:
Additional Information
- See also:
- compile compileFinal
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