Arma 3 Scripting

breakWith

  • Arma 3 v2.02

Command · Markdown · JSON · original wiki page

Description

Skips all loop iterations and immediately returns the given value.

Syntax

breakWith return

Parameters:

Returns: Anything

Examples

Example 1

// stops once _i reaches 5 and outputs 0, 1, 2, 3, 4, END
systemChat call {
    for "_i" from 0 to 10 do {
        if (_i == 5) then { breakWith "END"; };
        systemChat str _i;
    };
};

See also

continueWith · break · continue · breakOut