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

If else Problems, Help!


This is just my latest permutation of code, I can’t get else statements to work, and keep getting this error, help!


I’m going to need more to go on than this if I’m going to help you. Can you share what you have so far and the level you are working on. Be sure to use [code ] tags to get your code looking pretty.


Sorry, I thought I enclosed a screenshot on that first post. New here, sorry.


OK, so I see and extra ; in the middle of your if statements. if statements should not have semicolons.

Next, an else statement should be by itself with nothing else:

else enemy{


Thanks. the page reloaded and I rewrote my code. This helped.