Hey dudes, I was having a little trouble on Pee A Boom. It said I needed to pair the else statement with the if statement, I did that, and it is still saying the same thing. Help would be appreciated anyone can help but help would especially be appreciated from @nick. Thanks!
while True:
enemy = hero.findNearestEnemy()
if enemy:
hero.buildXY("fire-trap", 41, 24)
hero.moveXY(15, 16)
pass
while True:
else:
enemy = hero.findNearestEnemy()
if enemy:
hero.buildXY("fence", 41, 24)
hero.moveXY(15, 16)
Never heard of a level called “Pee” a Boom . Jokes aside, you do not need 2 While True loops in this level. Get rid of the second while true loop. It separates the if and else, so the system bugs out, trying to look for the if of the else.
Try three things. Eliminate the one line of space between the pass command and the else statement. Also, get rid of the buildXY in the else statement. Now, change the build fire trap location in the if statement to build on the red X.
Please don’t post solutions. The purpose of this board is to help people learn so that they can figure out levels on their own. Simply providing solutions does not help and is counterproductive to this goal. The two main rules here on this board are no swearing and no posting solutions. Thanks and welcome to the board.