isFinal: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) (Created page with "isFinal "varname" isFinal code") |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(17 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
isFinal " | {{RV|type=command | ||
isFinal | |||
|game1= arma3 | |||
|version1= 2.00 | |||
|gr1= Variables | |||
|descr= Checks if [[Code|code]] or a variable was compiled final with [[compileFinal]]. | |||
|s1= [[isFinal]] variable | |||
|p1= varName: [[String]] - A [[String]] pointing to a variable | |||
|r1= [[Boolean]] - [[true]] if final, [[false]] if not | |||
|s2= [[isFinal]] code | |||
|p21= code: [[Code]] - Some code | |||
|r2= [[Boolean]] - [[true]] if final, [[false]] if not | |||
|x1= <sqf> | |||
myCode = compileFinal "a = a + 1"; | |||
if (isFinal "myCode") then { systemChat "Code is compiled final." }; | |||
</sqf> | |||
|x2= <sqf>if (isFinal BIS_fnc_arsenal) then {chint "You can't edit this function!" };</sqf> | |||
|x3= Avoid overwrite .rpt warnings: | |||
<sqf>if (!isFinal fnc_myCode) then { fnc_myCode = compileFinal str_myCode };</sqf> | |||
|seealso= [[compile]] [[compileFinal]] | |||
}} |
Revision as of 13:00, 4 May 2022
Description
- Description:
- Checks if code or a variable was compiled final with compileFinal.
- Groups:
- Variables
Syntax
- Syntax:
- isFinal variable
- Parameters:
- varName: String - A String pointing to a variable
- Return Value:
- Boolean - true if final, false if not
Alternative Syntax
- Syntax:
- isFinal code
- Parameters:
- code: Code - Some code
- Return Value:
- Boolean - true if final, false if not
Examples
- Example 1:
- myCode = compileFinal "a = a + 1"; if (isFinal "myCode") then { systemChat "Code is compiled final." };
- Example 2:
- Example 3:
- Avoid overwrite .rpt 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