Difference between revisions of "isFinal"

From Bohemia Interactive Community
Jump to navigation Jump to search
m
(Example 2)
Line 18: Line 18:
 
|r2= [[Boolean]] - [[True]] if final, [[false]] if not
 
|r2= [[Boolean]] - [[True]] if final, [[false]] if not
  
|x1= <code>myCode = compileFinal "a = a + 1";
+
|x1= <code>myCode = [[compileFinal]] "a = a + 1";
[[if]] ([[isFinal]] myCode) then {[[systemChat]] "Code is compiled final."};</code>
+
[[if]] ([[isFinal]] myCode) [[then]] {[[systemChat]] "Code is compiled final."};</code>
 +
 
 +
|x2= <code>[[if]] ([[isFinal]] [[BIS_fnc_arsenal]]) then {[[hint]] "You can't edit this function!"};</code>
  
 
|seealso= [[compile]] [[compileFinal]]
 
|seealso= [[compile]] [[compileFinal]]

Revision as of 05:09, 17 July 2020

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

Description

Description:
Checks if code or a variable was compiled final with compileFinal.
Groups:
Uncategorised

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!"};

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 a3dev version 1.99]][[ Category: a3dev: New Scripting Commands | ISFINAL]][[ Category: a3dev: Scripting Commands | ISFINAL]]