Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

Need help on Clumsy Circle level [SOLVED]


#1

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?


#2

can you please tell us what the problem is when you run your code?


#3

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…

-@Luke10


#4
        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


#5

Thanks @123hi123 @Luke10 and @xython for replying. The problem was that I would say the names of soldiers even if they are in the circle. However, thanks to xython’s post, the problem is solved. Again, thank you for replying!


#6

You’re Welcome @Sir_Fenith!