Mac 10.9 love.graphics.setMode() issue

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
Cereal
Prole
Posts: 7
Joined: Wed Oct 09, 2013 8:20 pm

Mac 10.9 love.graphics.setMode() issue

Post by Cereal »

This is actually a problem that popped up some months ago during the last BaconGameJam, but I don't think I ever posted about it.

Basically, if I run the folder on my mac, I get a "attempted to call field 'setMode' (a nil value)".

The function in question is:

Code: Select all

function init()
	love.graphics.setMode(25*tileSize, 25*tileSize, false, false, 0)
	...
It works fine on windows, but with the next game jam coming up in a couple of hours, I figure it might be a good idea to see if you have a solution for me!

Edit: Oh, I should say where it's being called from.

Code: Select all

function love.load()
	local sound = love.audio.newSource("lib/music1.mp3")
	sound:setVolume(.2)
	sound:setLooping(true)
	love.audio.play(sound)
	goalSound:setVolume(.2)
	goalSound:rewind()
	img = love.graphics.newImage("lib/HowToPlay.png")
	q = love.graphics.newQuad(0,0,800,800,800,800)
	thanksimg = love.graphics.newImage("lib/thanks.png")
	tq = love.graphics.newQuad(0,0,800,800,800,800)
	loadMap(firstLevel)
	init()
	
end
I moved init() above all the over love.graphics. calls on the off chance it had something to do with that, but it didn't change anything.

Edit2: The source is here: https://bitbucket.org/HorizonShadow/gam ... ?at=master
Cheers.
User avatar
slime
Solid Snayke
Posts: 3162
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Mac 10.9 love.graphics.setMode() issue

Post by slime »

LÖVE 0.9 doesn't have love.graphics.setMode anymore, the function got moved to the (new as of 0.9.0) [wiki]love.window[/wiki] module as [wiki]love.window.setMode[/wiki], and its arguments changed slightly.

It sounds like you're running LÖVE 0.8.0 on Windows and 0.9.0 on OS X. The best solution would probably be to update to 0.9.0 on windows. It has a fair number of incompatibilities with 0.8.0, but most are just renamed functions.
Cereal
Prole
Posts: 7
Joined: Wed Oct 09, 2013 8:20 pm

Re: Mac 10.9 love.graphics.setMode() issue

Post by Cereal »

slime wrote:LÖVE 0.9 doesn't have love.graphics.setMode anymore, the function got moved to the (new as of 0.9.0) [wiki]love.window[/wiki] module as [wiki]love.window.setMode[/wiki], and its arguments changed slightly.

It sounds like you're running LÖVE 0.8.0 on Windows and 0.9.0 on OS X. The best solution would probably be to update to 0.9.0 on windows. It has a fair number of incompatibilities with 0.8.0, but most are just renamed functions.
Thank you kindly. That was the issue.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 8 guests