I’m confused on what I’m doing wrong with my code because well it looks right at least from my perspective.
From running my code it doesn’t accept the self.attack line. I tried mixing it up with self.attack(enemy) though that doesn’t change things either. I’m confused
//declaring the loop/starting it above
enemy = self.findNearestEnemy()
//initializing the variable inside loop to be constantly updated
self.attack() = enemy
//the attack line.
The error is always “Assigning to rvalue.” though I don’t get it. Thank you ahead of time!