Need help with medical attention

Hey there, to format your code highlight it and press the </> button.
Also, we have a problem helping you if you do not state what is happening. Why can’t you pass the level? Any Error messages? What language are you using? (Looks like Python to me)
It seems that you should not have and, it should be like this

if currentHealth < healingThreshold
self.moveXY(65,45)
self.say("Heal Me!")

Also, the attacking part should be changed. What is the “and” thing you are using? I did a little bit of research, and “and” in Python is like && in Javascript, a conditional operator.
So, the attacking part should be changed to where if you can cleave, you cleave the nearest enemy, and if you cannot, then you simple attack them. That would look like this:

if self.isReady("cleave"):
self.cleave(enemy)
else:
self.attack("enemy")

If it still doesn’t work, reply to me.
Be sure to remember that Python needs to be indented to work.
Good Luck!
PS, read the FAQ before posting. Thanks!

1 Like