code:
// You can write code before a loop.
// Break open the "Chest" before using the loop to escape the maze!
this.moveRight();
this.moveUp();
this.attack("Chest");
this.moveDown();
var i = 0;
while(i < 3)
// Move 3 times.
hero.moveRight(3);
hero.moveDown(3);
i ++;
keeps running right ignoring the hero.moveDown(3);
That’s strange, your code came up on my screen as in java. Well, anyway, if you are using python, then your code is only missing a : after your while loop
i = 0
while i < 3:
hero.moveRight(3)
hero.moveDown(3)
BreninLlwyd is correct. Your code is not python, it’s JS. In python, comments are preceeded by a "#" sign and in JS, comments are preceeded by a double "//". Also, semi-colons are not used in python. The code you posted in the original post is JS.
somebody help me on codecombat l need help on 12.dread door i need to move up and break the door it never moved up or just tall me how to make him go up and attack door
Welcome the CoCo DIscourse forums @Isaac_Smith !
This is a place to get help within levels, dicuss ideas, give suggestions for the game or just chat with other awesome coders!
Check out the FAQ and the rules if you haven’t already and have fun!
Welcome @Isaac_Smith
Please post your code in a new topic using the “+ New Topic” button in the main page, and don’t forget to format your code properly using this button