It seems that on line 8, evem though I defined enemy, it says that I need something to cast upon. here is my code
loop:
enemy = self.findNearest(self.findEnemies())
if self.canCast("drain-life", enemy):
self.cast("drain-life", enemy) #(line 8)
if self.distanceTo(enemy) < self.attackRange:
self.attack(enemy)
if self.canCast("fear"):
self.cast("fear")
I removed the comments
also, I wont cast fear, attack, or do anything else