Warning: file_put_contents(/ff_76e9508a1f63508f3a5712372f08597f3281f8a7931a5486.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