Corona SDK tutorial on Youtube - Dr. Rafael Hernandez

I’m following the youtube video tutorials to learn, and I’m getting a strange error here. You can see the video here. I do everything as is until 8:13. At this point the emulator gives an error. You can see it in the attached picture.

My main.lua is almost the same as the video shows. I only changed 

\_W = 

to 

local \_W =

What does this error tell me? I wish there were up-to-date tutorials, as it takes a long time to learn without actually doing things.

Hi @viperciyes,

Welcome to Corona. The reason you’re getting that error is because you’ve changed a global variable to a local variable. Because of that, Corona cannot recognize the variable _W in a certain scope.

Since you’re just starting out, I highly recommend that you access tutorials and guides in Corona University. These should be updated and current, and there are tutorials which cover virutally every aspect of Corona development.

http://coronalabs.com/resources/tutorials/

Also, I should mention that Director (which the video you’re watching uses) should probably not be used. Director was a 3rd-party scene management module from several years back, and it has not been supported or updated in a long, long time. Today, most Corona developers use the Composer library for scene management. We have a guide and various videos on this within Corona University, but I recommend that you begin with more basic topics and Lua essentials before attempting to set up a Composer-driven project.

As always, seek out assistance in the forums and in the documentation as well.

Take care,

Brent

Hey,

Thanks. I was stuck watching those out of date videos… just found the videos in the university.Thanks.

Hi @viperciyes,

Welcome to Corona. The reason you’re getting that error is because you’ve changed a global variable to a local variable. Because of that, Corona cannot recognize the variable _W in a certain scope.

Since you’re just starting out, I highly recommend that you access tutorials and guides in Corona University. These should be updated and current, and there are tutorials which cover virutally every aspect of Corona development.

http://coronalabs.com/resources/tutorials/

Also, I should mention that Director (which the video you’re watching uses) should probably not be used. Director was a 3rd-party scene management module from several years back, and it has not been supported or updated in a long, long time. Today, most Corona developers use the Composer library for scene management. We have a guide and various videos on this within Corona University, but I recommend that you begin with more basic topics and Lua essentials before attempting to set up a Composer-driven project.

As always, seek out assistance in the forums and in the documentation as well.

Take care,

Brent

Hey,

Thanks. I was stuck watching those out of date videos… just found the videos in the university.Thanks.