exitWith – Talk
Jump to navigation
Jump to search
m (Observation on the scope of this command.) |
mNo edit summary |
||
Line 1: | Line 1: | ||
It seems this command exits the current "scope", rather than the current script file. Is this correct? | It seems this command exits the current "scope" (is this the correct term?), rather than the current script file. Is this correct? | ||
Example code, started using [[execVM]]: | |||
<stuff> | <stuff> | ||
for "_j" from 1 to _value do | for "_j" from 1 to _value do | ||
Line 8: | Line 8: | ||
if (<exit condition>) exitWith {player sideChat "Cancelled"}; | if (<exit condition>) exitWith {player sideChat "Cancelled"}; | ||
}; | }; | ||
player sideChat "Complete"; | player sideChat "Complete"; | ||
If the exit condition is true, both sideChats are executed. Any comments? Or am I just stating the obvious? :) --[[User:Ceeeb|Ceeeb]] 10:04, 7 May 2007 (CEST) |
Revision as of 09:07, 7 May 2007
It seems this command exits the current "scope" (is this the correct term?), rather than the current script file. Is this correct?
Example code, started using execVM:
<stuff> for "_j" from 1 to _value do { <stuff> if (<exit condition>) exitWith {player sideChat "Cancelled"}; }; player sideChat "Complete";
If the exit condition is true, both sideChats are executed. Any comments? Or am I just stating the obvious? :) --Ceeeb 10:04, 7 May 2007 (CEST)