Storyboard Help

Hey everyone, I am going nuts trying to figure out the storyboard scene set up…I honestly have watched a half a dozen video tutorials and read some text tutorials and I can’t seem to wrap my head around what goes on the main.lua vs what goes on the scene lua file…I am a very green mobile developer and would love some guidance…

Here is my main.lua and what is supposed to be my first “scene”, my apps title page…

The title screen is supposed to have a scrolling background and a transitioned in logo and two buttons…

…please, feel free to let me know if you see any other crazy mistakes in my code along the way.

Thank you for your time and effort! 

—this has been resolved, thank you everyone!

Oh and the commented out stuff is on purpose, I have not fully figured out or have files for those parts of the project.

A couple things, first please use the code tags when posting code.  It looks like this in the toolbar < >.   You have posted a fair amount of code and it is a little difficult to read when the tags aren’t used.  Second, what is the problem you are having exactly?  You didn’t really state which part isn’t working.  

Hi…I activated the code mode you mentioned, I am sorry I was not aware of that before…

Ok, so I presently have my code in sublime and I and have been trying to get it to work on the simulator…I have fixed some errors that it had but it is now giving me an error…here is the error…it says something about adding “end” to it, but I thought I already did that…

Under you “Create Title Page Balloons” you start 2 for loops then immediately call end.  One does not have end, and also your createScene does not have an end.  “return scene” should be the very last thing, yet you have an ‘end’ after it. 

I’m really not trying to toot my own horn, but having run into the same problem several times, I put some code up on github:

https://github.com/jbp4444/GameOfLife

This uses the storyboard API.  My main.lua just calls a splash scene (through storyboard.gotoScene), which then calls a “main” scene (buttons to drive other scenes).

It works … even if its not terribly elegant.  If anyone has ways to improve it, by all means let me know.

—this has been resolved, thank you everyone! Everyone’s advice was great and I was able to fix the other little issues myself! :slight_smile:

Oh and the commented out stuff is on purpose, I have not fully figured out or have files for those parts of the project.

A couple things, first please use the code tags when posting code.  It looks like this in the toolbar < >.   You have posted a fair amount of code and it is a little difficult to read when the tags aren’t used.  Second, what is the problem you are having exactly?  You didn’t really state which part isn’t working.  

Hi…I activated the code mode you mentioned, I am sorry I was not aware of that before…

Ok, so I presently have my code in sublime and I and have been trying to get it to work on the simulator…I have fixed some errors that it had but it is now giving me an error…here is the error…it says something about adding “end” to it, but I thought I already did that…

Under you “Create Title Page Balloons” you start 2 for loops then immediately call end.  One does not have end, and also your createScene does not have an end.  “return scene” should be the very last thing, yet you have an ‘end’ after it. 

I’m really not trying to toot my own horn, but having run into the same problem several times, I put some code up on github:

https://github.com/jbp4444/GameOfLife

This uses the storyboard API.  My main.lua just calls a splash scene (through storyboard.gotoScene), which then calls a “main” scene (buttons to drive other scenes).

It works … even if its not terribly elegant.  If anyone has ways to improve it, by all means let me know.

—this has been resolved, thank you everyone! Everyone’s advice was great and I was able to fix the other little issues myself! :slight_smile: