I am doing dueling grounds when I encountered this unexpected error. It says that elif must be paired with an if, but I have an if in the statement above.
Problematic part of code:
for friend in friends:
if friend.distanceTo(enemyHero) < 20:
if friend.pos.y > enemyHero.pos.y:
hero.command(friend, "move", Vector(friend.pos.x, enemyHero.pos.y+10)
elif friend.pos.y < enemyHero.pos.y:<--- (Bug is in this line)
hero.command(friend, "move", Vector(friend.pos.x, enemyHero.pos.y-10)
Pls help, Thanks.