We get it. Nothing is more frustrating than when your code doesn’t work. We’ve all been there.

The top ten reasons when code isn’t working.

1. You forgot quotation marks.

Whenever you see quotes in the code on this website or in the block you have copied into the basic_game, you need to have quotation marks in your game.

For example:

completionURL: "../menu/menu.html" ,

If you have

completionURL: ../menu/menu.html  ,

Your code is not going to work. Go back and check that you have the quotation marks correct.

2. You deleted a comma.

In the config file, you need a comma between specifications. If instead of this …

   healthIcon: "images/tractor_small.png",
    characterImage: "images/tractor.png",

You have this:

   healthIcon: "images/tractor_small.png",
    characterImage: "images/tractor.png"
    maxHealthPoints: 10,

Your code is not going to work.

3. Your file does not exist because you spelled the name wrong

Are you SURE you spelled the name right?

Is your audio file named mayanintro3_eng.m4a and your code is

 audio1: "./audio/mayanintro3_eng.mp3",

GAME SPECIFIC BUGS

Maze Game

Your maze game looks weird. Developers hate it when they get bug reports like this. What exactly do you mean? In general, when someone says this it means that the images don’t fit inside the boxes and the boxes don’t line up in a grid, like below:

If your maze looks like this, the most likely problem is that you (ahem) accidentally deleted the values for cell size. Look in your maze_config.js file.

The default code is shown below:

//starting values
points : 10,

cellWidth: "60px",
cellHeight: "60px",
cellImageWidth: "50px",
cellImageHeight: "50px",

If you delete those values, for cellWidth, cellHeight, cellImageWidth and cellImageHeight you are going to see something like the mess above. The default game screen size is 1024 x 576. If you make your screen twice as large, you can double the cell and image sizes.