Backwoods standoff if else


#1

On Backwoods standoff, I believe I am doing it right but it keeps telling me to add a ‘:’ What do I do? Code:
while True:
enemy = hero.findNearestEnemy()
# Use an if-statement with isReady to check “cleave”:
if “cleave” hero.isReady: {THIS IS WHERE IT SAYS I AM WRONG. This side note is not in the code}
hero.cleave(enemy)
# Cleave!
# Else, if cleave is not ready:
else:
hero.attack(enemy)
hero.attack(enemy)
# Attack the nearest ogre!


#2

Next time try to preformat your code according to the FAQ


Also it is not if "cleave" hero.isReady: but it is if hero.isReady("cleave"):


#3

Thanks for the feedback!


#4


was this the intended usage?
else wouldn’t work


#5

I just used thornpick. It was so easy.


#6

Look at your methods to see the proper use/format for is.Ready(action). Everything you need to know is there. Get in the habit of looking at these methods. You’re going to need to refer to this quite often.


#7

you need to do if hero.isReady("cleave") for it to work.


#8


muahahaha


#9

with thornprick!(20)