exitWith – Talk

From Bohemia Interactive Community
Revision as of 10:04, 7 May 2007 by Ceeeb (talk | contribs) (Observation on the scope of this command.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

It seems this command exits the current "scope", rather than the current script file. Is this correct?

Code, started using execVM:

<stuff>
for "_j" from 1 to _value do 
 {
  <stuff>
  if (<exit condition>) exitWith {player sideChat "Cancelled"};
 };
sleep 2;
player sideChat "Complete";

Both sideChats are executed. Any comments? Or am I just stating the obvious? :) --Ceeeb 10:04, 7 May 2007 (CEST)