I need help with leave it to cleaver [Fixed]


#1

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?


#2

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


#3

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.


#4

Thank you, That helped a lot.


#5

No problem man. Cheers.


#6

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


#7

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")) {


#8

Thanks, That should be all.


#9

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


#10

Ok I will :slight_smile: