Page 1 of 1

Unexpected error! Please help!

Posted: Wed Apr 08, 2015 8:15 pm
by MattyAB
I have hit a brick wall with my new program, as it is giving an error that i do not understand. I will attach a .love of the game, so that you can see the problem. I have looked at this for a while and can not figure out why it is not working. Am i making a newbie mistake???

Thanks!

Re: Unexpected error! Please help!

Posted: Wed Apr 08, 2015 9:13 pm
by szensk
You need to call world.loadGraphics, where pauseButton is loaded, some time before the first time love.draw() is called.

For example, this doesn't crash:

Code: Select all

function love.load()
	gravity = 30
	platformBottom = love.graphics.getHeight() - ( love.graphics.getHeight() / 4 )
	world.load()
	player.load()
	world.loadGraphics()
end

Re: Unexpected error! Please help!

Posted: Thu Apr 09, 2015 7:06 am
by MattyAB
Aha thank you! that will help a lot:) a simple schoolboy error:/