Warning: file_put_contents(/ff_6abe3c0131af6a95b964891b3f64a9e935ad574170afaba5.php): failed to open stream: Permission denied in /home/ofpecsav/public_html/forum/Sources/Subs-ForumFirewall.php on line 1619
exitWith - OFPEC Scripting Command Reference | OFPEC The Editing Center

ifCommand exitWith code

Operand types

ifCommand : If Type
code: Code

Type of returned value


If result of condition is true, evaluates code, and current block with result of code.
exitWith exits the execution of a context, which doesnt mean it will exit a script.
A context is defined, for example, by while loops, for loops, if blocks, etc.
To simplify, if you have code between {}, then you have a context.

Used In



if (_x>5) exitWith {echo "_x is too big";_x}
Result is when _x is greater then 5, outputs message and terminates code in current level with value of _x