isFinal: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...)
m (Text replacement - " {3,}\|" to " |")
Line 27: Line 27:


|x3= Avoid overwrite .rpt warnings<code>[[if]] (![[isFinal]] fnc_myCode) [[then]] { fnc_myCode = [[compileFinal]] str_myCode };</code>
|x3= Avoid overwrite .rpt warnings<code>[[if]] (![[isFinal]] fnc_myCode) [[then]] { fnc_myCode = [[compileFinal]] str_myCode };</code>


|seealso= [[compile]] [[compileFinal]]
|seealso= [[compile]] [[compileFinal]]
}}
}}

Revision as of 18:42, 18 January 2021

-wrong parameter ("a3") defined!-[[:Category:Introduced with a3 version 2.00|2.00]]
Hover & click on the images for description

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:
if (isFinal BIS_fnc_arsenal) then {hint "You can't edit this function!"};
Example 3:
Avoid overwrite .rpt warningsif (!isFinal fnc_myCode) then { fnc_myCode = compileFinal str_myCode };

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

[[Category:Introduced with a3 version 2.00]][[ Category: a3: New Scripting Commands | ISFINAL]][[ Category: a3: Scripting Commands | ISFINAL]]