Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

Won't acknowledge ':'

In the backwoods forest on level ‘Forest Fire Dancing’, on one of the lines for a nested if statement it keeps saying code error, must have ‘:’. but i made sure it has that certain punctuation and even after i attempted multiple times while it was written on scree, it continued to not be able to read it and kept saying i need it even though it was there,

Hello, I think that another part of your code has a problem and the computer is getting all angry at something else. You should post your code so we can look at it and attempt to fix the problem, as it may be just a stray parenthesis!

1 Like

Please post a screen shot of your code with the error.

i deleted the whole thing like all the code and while rewriting, before i was even to the point and before i had it even written , it was saying that i didn’t have a ‘:’ for that certain line, when that line wasn’t even written yet. i can rewrite all the code and send a screenshot if need. even when i have all the code written, even the correct ones dont do anything and the character doesn’t move at all. i think it is a glitch or bug in just that level. let me go back to that level and rewrite everything again so i can get the screenshot and send it.

not even the correct coding makes the character move or anything.

line 17 is not necessary. Just delete it and your code will work fine.
Line 4 states:

if evilstone:

Line 15 states:

else:

So your code doesn’t need what you have for line 17.

if evilstone:
    do this
else:  # meaning that there is no evilstone
    do that

my problem isnt having the code wrong its that none of the code works because the level lets me write and all that but it doesnt actually act on the codes i put in. also, no matter what i change line 17 to, it still tells me the same error everytime.

and im not saying that my code is perfect because there probably is some errors in there

oh wait nevermind. your help worked. Thankyou so much for your help

The mistake here is that you used no instead of not.