I need help with leave it to cleaver [Fixed]

I am stuck on leave it to cleaver because this keeps happening and I cannot figure out why this error is poping up,

Dose anyone know why?

You are not closing your if statement: if(hero.distanceTo(target) < 5) { you never close the end bracket before the else statement.

Correct:
if(hero.distanceTo(target) < ){ var ready = hero.isReady("cleave"); hero.cleave(enemy); } then your else
Also, you might want an if statement for if your cleave is ready.

1 Like

Thank you, That helped a lot.

No problem man. Cheers.

One more thing. I did what should work and this.

On line 7, you never close your end parenthesis. it says if (hero.isReady("cleave") { notice, you never end the first parenthesis. Correct: if (hero.isReady("cleave")) {

Thanks, That should be all.

No problem mate. Let me know if you need anything else.

Ok I will :slight_smile: