Dangerous Tracks Help

Can anyone help? Not sure why only two lines of fire traps are being places instead of four

// Protect the village with fire traps.
// Mine all passages in four directions.
// You have 80 seconds before the ogres attack.
// Build traps on the line y=114 from x=40 to x=112 with step=24.
function buildNorthLine() {
    for (var x = 40; x <= 112; x += 24) {
        hero.buildXY("fire-trap", x, 114);
// Build traps on the line x=140 from y=110 to y=38 with step=18.
function buildEastLine() {
    // Complete this function:
    for (var y = 110; y <= 38; y -= 18) {
        hero.buildXY("fire-trap", 140, y);
// Build traps on the line y=22 from x=132 to x=32 with step=20.
function buildSouthLine() {
    // Complete this function:
    for (var x = 132; x <= 32; x += 20) {
        hero.buildXY("fire-trap", x, 22);
// Build traps on the line x=20 from y=28 to y=108 with step=16.
function buildWestLine() {
    // Complete this function:
    for (var y = 28; y <= 108; y -= 16) {
        hero.buildXY("fire-trap", 20, y);
hero.moveXY(40, 94);

1 Like

Welcome to Codecombat Discourse! Right now, we can’t see the current code. Can you copy/paste your code using triple backticks(```)? Thanks.

Are you able to see it now?

1 Like

Please learn to post your code correctly. The way it is now, we can’t see the structure. Help us help you. It’s very easy to do and just takes a tiny bit of effort. Please read this topic and format your code again correctly

It should be formatted properly now


Any body know why this is wrong ???

1 Like

Hello and welcome to codecombat discourse! This is a cozy forum where you can share ideas, share fan art, get assistance for code, etc! Before you proceed, we hope that you review this topic, which shows all essentials of this board! Thanks!

Hi there! Welcome to the discourse. Could you paste your code? We can’t help you if you don’t paste your code :frowning:

Make sure to format your code properly :smile: