Hi,
I have some classes that i wanted to change names, like from gameClass to GameClass, but for some reason, Gideros won't allow it. I'm using the scene manager, by the way. How can i do it?
My scenemanager code:
sceneManager = SceneManager.new({
--start scene
["start"] = start,
--options scene
["options"] = options,
--game scene
["gameClass"] = gameClass
}) |
And when i call the scene at my bonecosSelection class on line 85:
sceneManager:changeScene("gameClass", 1, transition, easing.outBack) |
I get this error:
classes/scenemanager.lua:286: attempt to index field '?' (a nil value)
stack traceback:
classes/scenemanager.lua:286: in function 'changeScene'
Area Selections/bonecos_selection.lua:85: in function
Thank you in advance,
Yuri
Comments
did you
- Rename your files on your computer
- Delete your file from your Gideros project hierarchy
- "Add Existing file" once again to your project
- Check your code dependencies
Did it solve your problem?Currently Gideros doesn't allow to modify and refresh your file names on your project without doing all of this.
But I'm sure @atilim is working on some improvements (for example the possibility to drag files to project, or automatically include files that are contained in a folder on your computer).
To do this, right click on bonecos_selection.lua in your file hierarchy and select code dependencies from the menu then set the checkbox next to gameClass.lua and close the dependencies window.
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
So, I tried following those steps and make bonecos_selection dependent of gameClass and it still doesn't work.
After doing all that I changed the calls inside the code to what I wanted:
Oddly enough, if I just change the name of the file, delete from the hierarchy, put it back, and don't change the calls inside the code, it works... why is that? I mean, if I change gameClass to GameClass, the former shouldn't exist anymore, right?
in GameClass.lua?
One more thing... I'm not sure I get why bonecos_selection needs to be dependant of GameClass.lua. How does that contribute to make it work?
But GameClass should already exist when changeScene() is called (it's done when you start the player) so I don't think that you need to add a code dependency between bonecos_selection.lua and GameClass.lua (unless I am missing something).
Likes: AxlFlame