Arma 3 Scripting

else

  • Arma 3 v0.50
  • First in Operation Flashpoint v1.85

Command · Markdown · JSON · original wiki page

Description

Executes else code when if condition returns false.

Syntax

thenCode else elseCode

Parameters:

Returns: Array with [thenCode, elseCode]

Examples

Example 1

if (a > b) then { c = 0 } else { c = 1 };

Example 2

if (a < b) then {
    hint "B is greater than A";
} else {
    hint "A is greater than B";
};

See also

Control Structures · if · then