Please help i'm stuck

i need help on patrol buster please help me i don’t know what to do!!!

Could you show us your code that you have so far? Or say what part you don’t understand?

i dont get what to type after this line.

// If there is an enemy, attack it!

So do you know any code that will help you determine IF there is an enemy? And you of course already know the code to enter to make your character attack, right?

So you need code that says:

if there is an enemy
    then use attack on that enemy

Since more enemy appear, this needs to be in a loop, so it will keep checking for enemies, and keep attacking them when there are.

so i changed my coding to python.

But it says unexpected indent what do i do?

This is a pretty strait forward level, I would recommend replaying the last few levels before it to get a refresher. You will want to learn how to use the IF statements before moving on.

In python indents are very important they define what is in a statement and what is not

need code so I can help you.

if enemy then

always useful

Please do not give ar ask for the entire code, you then ruin the experience for other young coders. You may ask for hints to get to the right code, but please do not give or ask for the whole code. Again, this will ruin the experience for young coders.

1 Like