Like this ? :
# Souviens toi qu'un ennemi peut ne pas exister pour le moment.
enemy = self.findNearestEnemy()
# S'il un ennemi existe, alors attaque le !!
I thank you for answer to my question so fast, and i beg your pardon for not see the FAQ post of the forum (and I think a copy/paste from the game make the deal right).
But I think you’re not see what my problem is.
The problem is I suceed in killing the monsters (my hero do it, and in the game they’re no problem it’s work with or without " : ", , they’re neither a problem of spaces because my hero suceed in killing monsters) but i have a problem of “code propre” (“proper code”?).
I need to make my hero 'not attacking" while there no monsters (if I understand well) and I see the in game guide(in english even if french is my mother tongue), and I don’t understand why my code isn’t “propre”.(unexpected token).
The problem is I haven’t a clue, for know how to make my hero do nothing.Or for typing right the fact that there no enemy.
That’s why, I make my hero move right if there no enemy(or what I thinked I will do).
Thank again for your dedication and speed of answer. -Essai1