this is mi code and I don’t no detected the problem!
loop {
var enemy = this.findNearestEnemy();
if(enemy) {
var distance = this.distanceTo(enemy);
if (distance < 5 ) {
this.isReady(“cleave”);
this.cleave(this.findNearestEnemy());
}
else {
this.attack(enemy);
}
}
}
Correctly formatted code is especially helpful on this one, but even with out it I do see an error.
you have “this.isReady(“cleave”);” as if it were a command, instead it needs to be part of an “if”:
if (this.isReady(“cleave”)) {
So that you don’t try to cleave when cleave is not ready. Fix this then if you still have trouble read the FAQ and then post your new code using the correct ```.