In my game at the beginning the first thing that you'll see is a campfire with this code:
var campfire = new Image();
campfire.onload = function () {
ctx.drawImage(campfire, campfireX, campfireY);
};
campfire.src = "Sprites/Campfire.png";
However, it doesn't work, I put an
alert("All systems a-ok");
at the end and i get the alert so i don't understand why it's there. You can find the actual image file here and the full code here. Sorry if I didn't format this well or something, I'm not very good at this =3
This may seem similar to an older question of mine in which I stated how to add a sprite onto the canvas, though in this case, I'm asking why the image doesn't appear on the canvas at all, even though there's no errors.