[Android] Application has been corrupted - lua_pcall failed with status 2

full error:

"lua_pcall failed with status 2, error message is: loop or previous error loading “CMainMenuState”

Hey guys,

So this has happened to me earlier in the project and i fixed it by not added a “require” to one file. It appeared to be some sort of lua circular include issue. However this time its not working. I saw a thread about this issue before and it has nothing to do with capital letters in files. Is there some sort of pseudo header protection in lua like c++? I feel like this is my issue because i’m doing a base object hierarchy in my game and they include other files. Any help or information would be great

thanks [import]uid: 115267 topic_id: 20652 reply_id: 320652[/import]

So I actually just added the "module(…, package.seeall) to the top of my files and it solved this issue. Im not sure why that helped so if anyone can elaborate I wouldn’t mind the information. [import]uid: 115267 topic_id: 20652 reply_id: 81066[/import]

All files (with the exception of main, config and build.settings) need to include that line or use the alternate method as posted by Jon Beebe. (Post was called “A Better Approach to Modules” if memory serves.)

I’m not totally sure how this works, it’s not something I’ve had much experience with, however I believe it was originally explained to me as files needing that line so that they can be properly accessed by others.

/chinscratch

I am going to try and do some reading on this later to get up to date.

Peach :slight_smile: [import]uid: 52491 topic_id: 20652 reply_id: 81194[/import]

thanks for the info, seems I will have to do some reading as well. [import]uid: 115267 topic_id: 20652 reply_id: 81303[/import]