composer.gotoScene problem

Hello** , everyone! So I have been working recently with corona and I want to ask what is currently wrong with this piece of code.**

So I began using composer.gotoScene and it does not work. Whenever I run it this error comes up…

w4xgqlp.png

this is probably an easy fix for more advanced users, but I just can’t figure it out. This is my code, thank you guys for helping!

FhFAtEJ.png

composer.getScene() returns the scene’s object. composer.gotoScene() needs a scene “Name”, which is a string. You would just do:

composer.gotoScene( "levelA", options )

In future posts, doing screen shots of code isn’t very useful (better than hand typing, but not by much). You are better off selecting the text in your editor and doing a CTRL-C (PC) or CMD-C (Mac) and then click the blue <> button in the forum’s edit bar (where Bold, Italic, Underline, etc. exist). Then paste your code in with CTRL-V/CMD-V… This will properly format your code.

Rob

composer.getScene() returns the scene’s object. composer.gotoScene() needs a scene “Name”, which is a string. You would just do:

composer.gotoScene( "levelA", options )

In future posts, doing screen shots of code isn’t very useful (better than hand typing, but not by much). You are better off selecting the text in your editor and doing a CTRL-C (PC) or CMD-C (Mac) and then click the blue <> button in the forum’s edit bar (where Bold, Italic, Underline, etc. exist). Then paste your code in with CTRL-V/CMD-V… This will properly format your code.

Rob