[Resolved] Trouble returning to menu of game (not sure which forum to post in)

Hi, I am a newbie to Corona and am building a whack style game which I’ve used example source files to help and modified to suit my game.
My problem is that when the user reaches the alert screen at the end of the game i want to insert a button that takes them back to the main menu, seems simple but i cant figure it out, my last app i created was by using different pages/.lua files and that was easy but I’ve created this whole game in main.lua and I’m stuck,
here is what i have from alert-

function alert()
timer.cancel(timerSource)

local alert = display.newImage(‘alertBg.png’)
alert:setReferencePoint(display.CenterReferencePoint)
alert.x = display.contentCenterX
alert.y = display.contentCenterY
transition.from(alert, {time = 300, xScale = 0.3, yScale = 0.3})

local score = display.newText(pollysHit … ‘/’ … totalPollys, 200, 165, native.systemFontBold, 30)
score:setTextColor(204, 152, 102)

alert:addEventListener(‘tap’, restart)
end

function restart()

display.remove(gameView)
gameView = nil
display.remove(alert)
alert = nil

Main()
end

Main()

please help :slight_smile:

Oh I’m getting the following errors in debugger

Runtime error ?:0: attempt to index a function value
stack traceback:
?: in function ‘remove’
…\main.lua:210: in function
[import]uid: 166525 topic_id: 30828 reply_id: 330828[/import]

never mind I solved it ye ha :slight_smile: [import]uid: 166525 topic_id: 30828 reply_id: 123359[/import]

never mind I solved it ye ha :slight_smile: [import]uid: 166525 topic_id: 30828 reply_id: 123359[/import]