guys here i am again, i actually finished the codes specifically to the game itself and it runs smoothly and perfectly as per its concept. but my problem now is when creating a scene it has an error saying like this “attempt to index local ‘background’ (a nil value)”.
function scene:create( event )
local sceneGroup = self.view
– Code here runs when the scene is first created but has not yet appeared on screen
local background = display.newImageRect( sceneGroup, “iqolors.png”, 360, 571 )
background.x = display.contentCenterX
background.y = display.contentCenter
local playButton = display.newText( sceneGroup, “Play”, display.contentCenterX, 700, native.systemFont, 44 )
playButton:setFillColor( 0.82, 0.86, 1 )
local highScoresButton = display.newText( sceneGroup, “High Scores”, display.contentCenterX, 810, native.systemFont, 44 )
highScoresButton:setFillColor( 0.75, 0.78, 1 )
playButton:addEventListener( “tap”, gotoGame )
highScoresButton:addEventListener( “tap”, gotoHighScores )
i dont know what’s wrong with this, “iqolors” is the file name of the picture. Needs help guys!