Python: While loop runs infinitely

The following code results in an infinite loop, even though the selected enemy is clearly dead. As far as I can tell, the syntax is correct (I’m a JS coder, using to learn Python).

This is as stripped-down as I can make the code to reproduce the issue; I’m aware that without a loop my hero won’t attack any other enemies.

Am I doing something wrong? Any help is appreciated.

e = self.findNearest(self.findEnemies())
while > 0:

Does this look like the issue you’re experiencing?

1 Like

That looks like it exactly! I’ve added my experience to the bug report there. Thanks.