Just for Kicks

Having a little problem,what does this mean?
SYSTEM: You have made 10000 calls to setXX methods without calling execute()
SYSTEM: Robot disabled: : Too many calls to setXX methods

I've striped my bot to the basics and it still happens
package FirstyListy;
import robocode.*;
//import java.awt.Color;

// API help : http://robocode.sourceforge.net/docs/robocode/robocode/Robot.html

/**
* TestRobot - a robot by (your name here)
*/
public class TestRobot extends AdvancedRobot{
int turnGunDirection = 1;

public void run() {

setAdjustRadarForRobotTurn(true);
while (true) {
setTurnRadarRight(360);

}
}
public void onScannedRobot(ScannedRobotEvent e) {

}
public void onHitByBullet(HitByBulletEvent e) {

}
public void onHitWall(HitWallEvent e) {

}
public void onHitRobot (HitRobotEvent e) {
}
}
 
Having a little problem,what does this mean?


I've striped my bot to the basics and it still happens

The error is because your are overloading the action thread.
You are using an advanced robot. Which means you need to use execute() to run your commands.
For your radar here is a suggestion :

In the run function put
setAdjustGunForRobotTurn(true);
setTurnRadarRight(Double.POSITIVE_INFINITY); // Radar Lock

Then at the end of your onScannedRobot put
setTurnRadarLeft(getRadarTurnRemaining());

This creates a locking radar scan that will hit with great accuracy.
The while loop is a bit of a misnomer. I got rid of it completely using that radar.
The run() method actually runs in loop itself. So any actions in there will repeat every tick.
 
LOL...I promise to give it my best attempt, although feels like Im going into a cage fight with my hands tied behind my back :D
 
Back
Top