I have a button to go back to a previous scene, and I cannot get it to work. The button appears if one of a series of elseif conditions are met.
local backButton = display.newImage (“playButton.jpg”)
backButton.x = 160
backButton.y = 440
localGroup:insert(backButton)
But when I load the level I get this error: “attempt to index global ‘backButton’ (a nil value)”
I’ve tried the function and the button and the listener in a separate file, so I know those parts are correct.
Is this enough of a clue to get me looking in the right direction for a solution? I’d sure appreciate any help. [import]uid: 96383 topic_id: 16652 reply_id: 316652[/import]