Debugging tip
If you are trying to figure out why something went wrong, you can do this:
And you'll get output like this:
And you'll get output like this:
Robot: stack traceback:
robots/ender.bot:76: in function 'distanceTo'
robots/ender.bot:278: in function 'attackNearbyEnemies'
robots/ender.bot:383: in function 'onTick'
robot_helper_functions.lua:124: in function <robot_helper_functions.lua:120>