Udemy Course

Good evening, 

I bought a few Udemy courses, but this pirates vs ninjas is not going very well and I thought maybe someone might be able to help me.  I keep getting these error message when I save the code, I’ve checked my spelling and checked for any missing commas.

I trying to make a simple game and I would like to know, do I have to use Composer?

If you notice I commented out a few sections, it was the only way to save it without getting the long errors list.

Appreciate any help, 

Thanks

  1. Paste clean snippets of code, please, not screenshots.  This forces helpers to type your code again and that isn’t much fun.

  2. When you do paste code, format it with forums tools:

formatyourcode.jpg

  1. Too many questions for one post, so I’l answer two three and leave the rest to others.

In screenshot 3…  bg is a typo and should be bgSky.

In screenshot 4… no idea what the issue is exactly other than some error with the file.  Trick: require the file to see what the issue is.

No, should NOT use composer.* till you are solid on other things.  Of course, maybe we’re not on the same page.  I am assuming by simple game, you make a game that just starts immediately when run and won’t be for sale.

Corona RUntime Error:
 

Under menu_scene.lua on line 23 you have written the code as:

[lua]

local bgSky =  display.newImageRect(sceneGroup,“bgSky.png”,1425,950)

[/lua]

whereas  on line 24 you used :

[lua]

bg.x= _CX; bg.y=_CY;

[/lua]

make it as :

[lua]
local bgSky =  display.newImageRect(sceneGroup,“bgSky.png”,1425,950)

bgSky.x= _CX;
bgSk .y=_CY;

[/lua]

-Assif

Thanks both for helping me.

roaminggamer I especially appreciate all the info you gave, I did ask too many questions I won’t do that again and I had not idea about the code paste.

Thanks again to both

Welcome DLuck :) 

-Assif

 

@Dluck - Thanks.  I want to help, but I (like others) have limited time so I must be careful how I spend it.  You (and others) can help me to help you by posting clean code, separating questions that are not related, telling me the basics (what you did, what you expected to see, why you thought it was wrong, what you did to debug), and… about your setup: machine, OS, target device(s), corona version.  

Thanks and good luck + have fun on you learning journey.

  1. Paste clean snippets of code, please, not screenshots.  This forces helpers to type your code again and that isn’t much fun.

  2. When you do paste code, format it with forums tools:

formatyourcode.jpg

  1. Too many questions for one post, so I’l answer two three and leave the rest to others.

In screenshot 3…  bg is a typo and should be bgSky.

In screenshot 4… no idea what the issue is exactly other than some error with the file.  Trick: require the file to see what the issue is.

No, should NOT use composer.* till you are solid on other things.  Of course, maybe we’re not on the same page.  I am assuming by simple game, you make a game that just starts immediately when run and won’t be for sale.

Corona RUntime Error:
 

Under menu_scene.lua on line 23 you have written the code as:

[lua]

local bgSky =  display.newImageRect(sceneGroup,“bgSky.png”,1425,950)

[/lua]

whereas  on line 24 you used :

[lua]

bg.x= _CX; bg.y=_CY;

[/lua]

make it as :

[lua]
local bgSky =  display.newImageRect(sceneGroup,“bgSky.png”,1425,950)

bgSky.x= _CX;
bgSk .y=_CY;

[/lua]

-Assif

Thanks both for helping me.

roaminggamer I especially appreciate all the info you gave, I did ask too many questions I won’t do that again and I had not idea about the code paste.

Thanks again to both

Welcome DLuck :) 

-Assif

 

@Dluck - Thanks.  I want to help, but I (like others) have limited time so I must be careful how I spend it.  You (and others) can help me to help you by posting clean code, separating questions that are not related, telling me the basics (what you did, what you expected to see, why you thought it was wrong, what you did to debug), and… about your setup: machine, OS, target device(s), corona version.  

Thanks and good luck + have fun on you learning journey.