Can't gotoScene in the same folder

In “scene1” I have this code:

composer.gotoScene( "Scenes.Places.scene2")

Error:

File: module 'scene2' not found

* scene1 exists in the same folder as scene2 (Places)

* scene2 has the (scene_template) code in it, so it should work fine.

is scene 2 in a folder called  *Scenes\Places*  i.e. is Scenes\Places\scene2.lua a valid path ?

Yes. Also, there are no typos or anything like that. 

  1. Look for typos (case mismatches and spelling issues).  

Regardless of your statement, 99.99% of the time this is a typo issue.

  1. If you’ve got an syntax error in the scene file that is encountered on initial load and interpretation, you will not be able to go to it and the error will be hard to track down.  I DO NOT think that is the problem this time.

However, you can both verify the existence of the file and find these weird bugs by doing this to test that the file can be loaded:

At top of main.lua temporarily add this to see if you can load the scene file:

require "Scenes.Places.scene2"
  1. If you still can’t find the issue,  zip up your project and share it here via dropbox.

One of us will find the problem quickly.

Note: There is NO LIMIT to the number of scene files in a folder.  That works fine, so it has to be your code.

is scene 2 in a folder called  *Scenes\Places*  i.e. is Scenes\Places\scene2.lua a valid path ?

Yes. Also, there are no typos or anything like that. 

  1. Look for typos (case mismatches and spelling issues).  

Regardless of your statement, 99.99% of the time this is a typo issue.

  1. If you’ve got an syntax error in the scene file that is encountered on initial load and interpretation, you will not be able to go to it and the error will be hard to track down.  I DO NOT think that is the problem this time.

However, you can both verify the existence of the file and find these weird bugs by doing this to test that the file can be loaded:

At top of main.lua temporarily add this to see if you can load the scene file:

require "Scenes.Places.scene2"
  1. If you still can’t find the issue,  zip up your project and share it here via dropbox.

One of us will find the problem quickly.

Note: There is NO LIMIT to the number of scene files in a folder.  That works fine, so it has to be your code.