Help: Medical Attention

my guy won’t move at all please help



while True:
    enemy = hero.findNearestEnemy()
    currentHealth = hero.health;
    healingThreshold = hero.maxHealth / 2;
    
    
    
    if (currentHealth < healingThreshold):
        {
        hero.moveXY(65, 46):
            hero.say("heal me")
    if enemy == 10:
        hero.attack(hero.findNearestEnemy())
    

it keeps saying this

Delete this then you should be good

and he still wont move

Show me your new code



while True:
    enemy = hero.findNearestEnemy()
    currentHealth = hero.health;
    healingThreshold = hero.maxHealth / 2;
    
    
    
    if (currentHealth < healingThreshold):
        {
        hero.moveXY(65, 46):
            hero.say("heal me")
    if enemy:
        hero.attack(enemy)
    

and also just put enemy here for this

it is saying the line that line 14 has a problem and that is my if statement

What language are you using

python i am using python

You have a mix of python and javascript, you need to choose one
Lydia

where is the javascript?

And your indentation is wrong here:

Lydia

ok so get rid of all that

Yup then give us your new code.



while True:
    enemy = hero.findNearestEnemy()
    currentHealth = hero.health
    healingThreshold = hero.maxHealth / 2;
    
    
    
    if currentHealth < healingThreshold
        
    hero.moveXY(65, 46):
        hero.say("heal me")
    if enemy:
        hero.attack(enemy)
    
    

What happens now(20 char)

it says line 5 is wrong

Put this : at the end of the line

ummm that is already there?