Hint 'script started' //will get executed Posted on 02:40 Galzohar 1.05 If the condition is nil then neither the 'then' nor the 'else' section get executed, but the script will proceed with no error messages. If you know you want to use the variable outside the 'if' statement, make sure your declare it before the 'if' statement. Only post proven facts here! Add Note Posted on 04:08 CeeebĪny _local variables you declare within the body of an if/ then statement (ie between the curly braces) are local to that 'if' statement, and are destroyed at the end of the statement. Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums. Hint _val Additional Information See also: else exitWith then Control Structures Lazy evaluation Notes Examples Example 1: _retVal = if (1 > 0) then ] This predicate is used in then or exitWith commands. Return Value: If Type - Predicate which will execute 1st or 2nd option when used. Otherwise, the 'else' clause (if present) is executed. Groups: Program Flow Syntax Syntax: if condition Parameters: condition: Boolean - If it evaluates as 'true', the 'then' clause is executed.
Hover & click on the images for description Description Description: This operator creates a If Type which is used in the if-construct as described here.