Error
main.lua:20: attempt to index global 'Scene' (a nil value)
Traceback
main.lua:20: in function <main.lua:18>
[C]: in function 'xpcall'
My code is:
Code: Select all
function love.load()
playstarter = love.graphics.newImage("TitleAssets/startplay.png")
time = 0
end
function love.draw()
love.graphics.setColor(0, 1, 0.3)
love.graphics.circle("fill", 416, 300, 80+math.sin(time)*10)
love.graphics.setColor(1, 1, 1)
love.graphics.scale(0.55, 0.55)
love.graphics.draw(playstarter, 560, 315+math.sin(time)*8)
end
function love.update(dt)
time = time + dt
end
function love.touchpressed(id, x, y)
Scene1 = ("Scenes/Scene1") <-- error here
if Scene.load then Scene:touchpressed(id,x, y) end
end