The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.15 (Linux)
File Line Function
/showthread.php 906 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes mysterious try...catch block
#1
I tried try...catch block.
And saw strange work that block.
I have two flags: BlueFlag and VioletFlag, for example.
Distance between two flags about 100m.
My Bot moves between these flags.
Code:
extern void object::test()
{
   try
   {
       while(true)
       {
           goto(radar(VioletFlag).position);
           goto(radar(BlueFlag).position);
       }
   }
   catch(energyCell.energyLevel < 0.8)
   {
       message("Energy low");
       goto(radar(PowerStation).position);
   }
}

When Energy is lower 0.8, message "Energy low" appears, but the Bot continues to moves to one of the flags,
and then moves to the PowerStation.

The goto(radar(xxxFlag).position) command is not interrupted
Why?


Messages In This Thread
Thread Modes mysterious try...catch block - by Dogmat - 05-31-2018, 12:04 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)