I don’t know what I’m doing wrong. Here is the problem code:
if soldier != on:
hero.say(soldier.id)
Can someone please help me?
I don’t know what I’m doing wrong. Here is the problem code:
if soldier != on:
hero.say(soldier.id)
Can someone please help me?
can you please tell us what the problem is when you run your code?
As @123hi123 mentioned. We need more information about your problem. Such as the error it gives when you run it, what happens when you run it, and also a screenshot would be advised…
if soldier != on: # here is the hidden fault
He’s comparing an object ( a soldier ) with a boolean value. Only check if on
( onCircle(soldier, circleRadius) ) is true or false