Hey everyone I’m stuck on Signal Corpse. It’s saying “Line 17: ReferenceError: enemy is not defined”. But I’m not sure how to define the enemy. Help on that would be great as well as any other errors.
Here’s my code:
loop: green = self.findFlag("green") black = self.findFlag("black") nearest = self.findNearestEnemy() if green: self.pickUpFlag(green) self.pickUpFlag(black) # Cleave! elif black and self.isReady("cleave"): self.cleave(enemy) elif nearest and self.distanceTo(nearest) < 10: # Attack! self.attack(enemy) pass
Thanks for the help!