start utton malfunction

I am creating the start menu for my app . I am trying to make it so that when you press the play button you start the game ( but in corona’s case go to game.lua file ). this is my code(cleaned up code rob if you’re reading this):

<

local composer = require( “composer” )

local function onbuttonRelease()
   composer:gotoScene( “game” )
end
 
gloal = function (scene:)createScene(event)
 local group = self.view
 
 – display background image
  local background = display.newImage( “background.png” )
  background.x = 10; background.y = 308
 
  – display ground image
 local ground = display.newImage( “ground.png” )
 ground.x = 145; ground.y = 480
 
 – display logo image
    local logo = display.newImageRect( “logo.png”,  250, 150 )
    logo.x = 160 logo.y = 7
 
    – display play button
    local button = display.newImageRect( “button.png”, 100, 100 )
    button.x = 160 button.y = 350
 

 group:insert(background)
 group:insert(logo)
 group:insert(button)
 group:insert(ground)
end

function game:enterScene( game )
 local group = self.view
end

function scene:exitScene( game )
 local group = self.view
 composer.removeScene( “main” )
end
 
function scene:destroyScene( game )
 local group = self.view
end
  
scene:addEventListener( “createScene”, scene )
scene:addEventListener( “enterScene”, scene )
scene:addEventListener( “exitScene”, scene )
scene:addEventListener( “destroyScene”, scene )

return scene >

I am getting this error :

<  main.lua:7: ‘)’ expected near ':

do you want to relaunch ? what is the problem. and please look at the code before you answer.Thank you.

When you post your code, please use the <> button in the edit bar in the same row as Bold, italic, etc.

You are still mixing and matching Storyboard and Composer code.  Please go here:

https://github.com/coronalabs/sample-game-project

and download that code.  Take the file:  template.lua  study it. All the code you see in template.lua has to be in any scene.   You can’t leave any of it out or change it.  Now look at game.lua and see how things are added to the various functions and parts of the code.  When you have a working scene, the error you’re getting in main.lua will likely go away (there still could be an issue in main.lua).

Rob

When you post your code, please use the <> button in the edit bar in the same row as Bold, italic, etc.

You are still mixing and matching Storyboard and Composer code.  Please go here:

https://github.com/coronalabs/sample-game-project

and download that code.  Take the file:  template.lua  study it. All the code you see in template.lua has to be in any scene.   You can’t leave any of it out or change it.  Now look at game.lua and see how things are added to the various functions and parts of the code.  When you have a working scene, the error you’re getting in main.lua will likely go away (there still could be an issue in main.lua).

Rob