Hello, I’ve started learning how to use corona via this tutorial and I’ve followed it step by step and I’m getting this error:
start.lua:24: ERROR: table expected. If this is a function call, you might have used ‘.’ instead of ‘:’
stack traceback:
[C]:in function ‘insert’
start.lua:24: in function <start.lua:15>
?:in function ‘dispatchEvent’
?:in function ‘gotoScene’
start.lua
local storyboard = require("storyboard") local scene = storyboard.newScene() local startbutton function scene:createScene(event) local group = self.view local background = display.newRect(0, 0, display.contentWidth, display.contentHeight) background:setFillColor(0, .39, .75) group:insert(background) local bigplane = display.newImage("bigplane.png", 0, 0) group:insert(bigplane) startbutton = display.newImage("startbutton.png", 264, 670) group:insert(startbutton) end function scene:enterScene(event) startbutton:addEventListener("tap", startGame) end function scene:exitScene(event) startbutton:removeEventListener("tap", startGame) end function startGame() storyboard.gotoScene("gamelevel") end scene:addEventListener("createScene", scene) scene:addEventListener("enterScene", scene) scene:addEventListener("enterScene", scene) return scene
main.lua:24: in main chunk