Mac 10.9 love.graphics.setMode() issue
Posted: Fri Mar 21, 2014 8:02 pm
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:
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.
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.
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)
...
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
Edit2: The source is here: https://bitbucket.org/HorizonShadow/gam ... ?at=master
Cheers.