I am in the Sarven Brawl, and I have been having trouble targeting specific types of enemies. I want to set up an if statement to target everything but throwers and sand yaks. However, my hero just stands there and doesn’t do anything. Here is an excerpt from my code:
if enemy.type == "thrower": hero.attack(enemy) elif distance < 15: if enemy.type == enemy not "thrower" or "sand-yak": hero.attack(enemy) else: pass elif enemy.type == "sand-yak": pass
I get an error message at this line
if enemy.type == enemy not "thrower" or "sand-yak":
that says, “Unexpected token: expected expr but found T_NAME while parsing comparison”
Does anyone know what this means or how to fix it? I feel like it’s something really silly that I’m just missing, LMAO.