Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Beware the exitWith {}  (Read 1823 times)

0 Members and 1 Guest are viewing this topic.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Beware the exitWith {}
« 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

Offline Nixer6

  • Members
  • *
Re: Beware the exitWith {}
« Reply #1 on: 28 Jun 2007, 23:17:20 »
Thanks Mando

Really good info and much appreciated.
Why do I have to be a Rocket Scientist to make a good mission?

Offline ViperMaul

  • Members
  • *
    • Theatre Of War (Team PvP Campaign)
Re: Beware the exitWith {}
« Reply #2 on: 03 Jul 2007, 10:34:51 »
Yes Thanks!
ViperMaul
Theatre of War (Co-Lead Dev)
ACE (Jr Project Manager)