Newbie Storyboard goToScene Major HELP!

Hello! Major corona newbieee. I’m having problems with goToScene. I want to go to my next scene but I can’t Im having errors. 

main.lua

\_W = display.contentWidth; \_H = display.contentHeight; display.setStatusBar( display.HiddenStatusBar ) local storyboard = require "storyboard" local scene = storyboard.newScene() storyboard.gotoScene( "menu" ) function scene:createScene( event ) end function scene:enterScene( event ) end function scene:exitScene( event ) end function scene:destroyScene( event ) end scene:addEventListener( "createScene", scene ) scene:addEventListener( "enterScene", scene ) scene:addEventListener( "exitScene", scene ) scene:addEventListener( "destroyScene", scene ) return scene

menu.lua

local storyboard = require( "storyboard" ) local widget = require "widget" local scene = storyboard.newScene() local ui = require("ui") display.setStatusBar( display.HiddenStatusBar ) local phase local function Play(event) --The debugger says This line storyboard.gotoScene( "play", "Fade", 500) --and this line are errors I checked tutorials and sample codes and they're pretty much the same return true end --creates scene function scene:createScene( event ) local group = self.view --background local background = display.newImage("background.png", true) background.x = display.contentWidth / 2 background.y = display.contentHeight / 2 --logo local logo = display.newImage("logo.png") logo.x = display.contentWidth / 2 logo.y = 130 --buttons playButton = display.newImage("buttonuntouched.png", 280, 320) playButton:addEventListener("touch", Play) playButton.x = display.contentWidth / 2 playButton.y = 300 end --enter scene function scene:enterScene( event ) local group = self.view end --exit scene function scene:exitScene( event ) local group = self.view end --destroy scene function scene:destroyScene( event ) local group = self.view end scene:addEventListener ("createScene", scene) scene:addEventListener ("enterScene", scene) scene:addEventListener ("exitScene", scene) scene:addEventListener ("destroyScene", scene) return scene 

play.lua

local storyboard = require( "storyboard" ) local scene = storyboard.newScene() --Set Global width and height variables \_W = display.contentWidth; \_H = display.contentHeight; --Hide status bar display.setStatusBar(display.HiddenStatusBar); --Background local bg = display.newImage("bg.png") scene:addEventListener( "createScene", scene ) scene:addEventListener( "enterScene", scene ) scene:addEventListener( "exitScene", scene ) scene:addEventListener( "destroyScene", scene ) return scene

I didnt put my code yet in my play menu because i want to clear all errors first.

I hope someone can help me. A million thanks in advance! 

Could you maybe tell us what the errors are?

Hi alanPlantPot!

This is the error

?:0:attempt to index field ‘from’ (a nil value)

stack traceback:

    [C]:?

    ?:in function ‘gotoScene’

    c:\users\documents\matching\menu.lua:11:in functioon <c:\users\documents\matching\menu.lua:10>

    ?: in function <?:218>

storyboard.gotoScene uses a table for options.  Have you tried:

[lua]storyboard.gotoScene( “play”, { effect = “fade”, time= 500 } )[/lua]

Also, your calling it in a touch function, but not in any particular phase.  

So it will be called when the touch begins, moves and ends. You probably only want it to happen on either the “began” or “ended” phases.

Could you maybe tell us what the errors are?

Hi alanPlantPot!

This is the error

?:0:attempt to index field ‘from’ (a nil value)

stack traceback:

    [C]:?

    ?:in function ‘gotoScene’

    c:\users\documents\matching\menu.lua:11:in functioon <c:\users\documents\matching\menu.lua:10>

    ?: in function <?:218>

storyboard.gotoScene uses a table for options.  Have you tried:

[lua]storyboard.gotoScene( “play”, { effect = “fade”, time= 500 } )[/lua]

Also, your calling it in a touch function, but not in any particular phase.  

So it will be called when the touch begins, moves and ends. You probably only want it to happen on either the “began” or “ended” phases.