Unexpected error! Please help!

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
MattyAB
Citizen
Posts: 57
Joined: Wed Mar 25, 2015 8:37 pm

Unexpected error! Please help!

Post 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!
Attachments
Love2DMadness.zip
A zip containing the .love and src of the program.
(204.58 KiB) Downloaded 62 times
Check out my blog - The place to find out about the latest tech news! http://thegeekcircle.blogspot.co.uk/
szensk
Party member
Posts: 155
Joined: Sat Jan 19, 2013 3:57 am

Re: Unexpected error! Please help!

Post 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
User avatar
MattyAB
Citizen
Posts: 57
Joined: Wed Mar 25, 2015 8:37 pm

Re: Unexpected error! Please help!

Post by MattyAB »

Aha thank you! that will help a lot:) a simple schoolboy error:/
Check out my blog - The place to find out about the latest tech news! http://thegeekcircle.blogspot.co.uk/
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 199 guests