There's not an error message now, but the codes still don't do anything. And now SMBX crashes when trying to open some of my levels, even when I get rid of the lunaworld file completely.I found out that I had somehow deleted the background folder, and that was causing the crash. And the codes work, they just can't find the images to load. I must have the path to the file put in wrong. How am I supposed to put in the path so it will work? Currently the path in the code is "HUD\hud.png" The full path is
"C:\SMBX\worlds\Mario & the 7 Orbs\HUD\hud.png" I tried both those for the path, actually, and neither of them worked.
Here's my code after I modified it:
Code: Select all
function onLoad()
loadImage ("HUD\hud.png", 1, 0xff00dc);
loadImage ("HUD\dcind.png", 2, 0xff00dc);
loadImage ("HUD\dcslot.png", 3, 0xff00dc);
end
function onLoop()
placeSprite (1, 1, 174, 8);
endAlso, I was wondering, does the placeSprite function work if triggered on level load, or does it need to be on the onLoop function?