OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Mandoble on 25 Jun 2007, 12:03:51

Title: Beware the exitWith {}
Post by: Mandoble on 25 Jun 2007, 12:03:51
exitWith only exists the current scope, using it doesnt guarantee to exit any script.
As an example:
Code: [Select]
SCOPE 0
while {true} do
{
   SCOPE 1
   while {player in truck1} do
   {
      SCOPE 2
      if (damage truck1 > 0.5) exitWith {hint "Too much damage"};
   }
   RETURN POINT OF EXITWITH INSIDE SCOPE 2
   if (damage truck1 > 0.5) exitWith {};
}
RETURN POINT OF EXITWITH INSIDE SCOPE 1
Title: Re: Beware the exitWith {}
Post by: Nixer6 on 28 Jun 2007, 23:17:20
Thanks Mando

Really good info and much appreciated.
Title: Re: Beware the exitWith {}
Post by: ViperMaul on 03 Jul 2007, 10:34:51
Yes Thanks!