Getting a headache please assist

I been racking my brain to try to get this to work -

[code]local function buttons:touch( event )
local phase = event.phase
if “began” == phase then
storyboard.gotoScene( uploader [, effect = “crossFade”, time = 800,] )

end

return true
end[/code]

I am using the storyboard api. This is probably easy to a seasoned programmer, but my real expertise is CG, not programming (yet!^^)…To be honest, this is the only programming language that i actually understand (to a point, that is).

I know its that snippet of code because I commented it out and i get no errors. But when I remove the comment from that snippet, i get an error. So, if anyone can figure out whats wrong with it and post a solution i would be very grateful. Thanks everyone.

-Joe [import]uid: 157993 topic_id: 34109 reply_id: 334109[/import]

Forgot to add, “uploader” is the name of the scene I am trying to go to. [import]uid: 157993 topic_id: 34109 reply_id: 135596[/import]

Think your gotoScene is wrong, here is mine -

storyboard.gotoScene( “maingame”, “slideUp”, 1000 )

Dave [import]uid: 117617 topic_id: 34109 reply_id: 135602[/import]

Dave is right - you need to remove the ‘[’ and ‘]’ because that is documentation talk for ‘optional parameters’ and the name of the scene needs to be provided in double quotes, because you’re naming the scene to go to, not passing a reference to it.

Also, when you are getting a specific error in the console, you really should provide that in your thread post so other forum users can see what the simulator is telling you. [import]uid: 8271 topic_id: 34109 reply_id: 135615[/import]

It worked, thanks a lot!!!

Sadly, before this post, I looked at the syntax from the docs and I still didnt see my mistake cause i was getting so frustrated (maybe if there was more color coding or a asterik ( * ) note or something?^^)…Programming drives me crazy sometimes I think its time for a stress reliever break. LOL thanks again! I appreciate the help. :slight_smile: [import]uid: 157993 topic_id: 34109 reply_id: 135663[/import]

The storyboard.gotoScene has two (well three) different calling options:

  1. storyboard.gotoScene( “scenename”, “effect”, time)
    This is the older way to do things. It expects two strings and an integer.

  2. storyboard.gotoScene( “scenename”, {effect=“effect”, time=time} )
    In this newer version, we only pass two parameters, a string scenename and a table of options. In this example, we are creating a table on the fly (not part of a variable) that has the two table values included. Some people might write it like this:

storyboard.gotoScene( "uploader", { effect = "crossFade", time = 800 } )  

or they might do:

options = {  
 effect = "crossFade",  
 time = 800  
}  
storyboard.gotoScene("uploader", options)  

Now you have uploader not in quotes, so I don’t know if you intend to go to a scene named uploader (which should be a string in quotes) or you have a variable called uploader which holds a string of the scene name you want to go to.

The 3rd method is: storyboard.gotoScene(“scenename”) with no extra parameters but you won’t get any effects this say.
[import]uid: 199310 topic_id: 34109 reply_id: 135686[/import]

Forgot to add, “uploader” is the name of the scene I am trying to go to. [import]uid: 157993 topic_id: 34109 reply_id: 135596[/import]

Think your gotoScene is wrong, here is mine -

storyboard.gotoScene( “maingame”, “slideUp”, 1000 )

Dave [import]uid: 117617 topic_id: 34109 reply_id: 135602[/import]

Dave is right - you need to remove the ‘[’ and ‘]’ because that is documentation talk for ‘optional parameters’ and the name of the scene needs to be provided in double quotes, because you’re naming the scene to go to, not passing a reference to it.

Also, when you are getting a specific error in the console, you really should provide that in your thread post so other forum users can see what the simulator is telling you. [import]uid: 8271 topic_id: 34109 reply_id: 135615[/import]

It worked, thanks a lot!!!

Sadly, before this post, I looked at the syntax from the docs and I still didnt see my mistake cause i was getting so frustrated (maybe if there was more color coding or a asterik ( * ) note or something?^^)…Programming drives me crazy sometimes I think its time for a stress reliever break. LOL thanks again! I appreciate the help. :slight_smile: [import]uid: 157993 topic_id: 34109 reply_id: 135663[/import]

The storyboard.gotoScene has two (well three) different calling options:

  1. storyboard.gotoScene( “scenename”, “effect”, time)
    This is the older way to do things. It expects two strings and an integer.

  2. storyboard.gotoScene( “scenename”, {effect=“effect”, time=time} )
    In this newer version, we only pass two parameters, a string scenename and a table of options. In this example, we are creating a table on the fly (not part of a variable) that has the two table values included. Some people might write it like this:

storyboard.gotoScene( "uploader", { effect = "crossFade", time = 800 } )  

or they might do:

options = {  
 effect = "crossFade",  
 time = 800  
}  
storyboard.gotoScene("uploader", options)  

Now you have uploader not in quotes, so I don’t know if you intend to go to a scene named uploader (which should be a string in quotes) or you have a variable called uploader which holds a string of the scene name you want to go to.

The 3rd method is: storyboard.gotoScene(“scenename”) with no extra parameters but you won’t get any effects this say.
[import]uid: 199310 topic_id: 34109 reply_id: 135686[/import]