Colobot Forum - International Colobot Community

Full Version: Thread Modes mysterious try...catch block
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
extern void object::test()
   catch(energyCell.energyLevel < 0.8)
       message("Energy low");

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
It's a known bug. That's why it was never officially documented in original Colobot. See