If you really, really need this, you can achieve C #include like this:
- make a “source directory”
- make an “export directory”
- download some preprocessor tool or develop your own that supports #include directive
- write a script which calls PP on .lua files in the source directory and writes output files to export directory
- execute said script before running Corona on export directory, and needs to be rerun whenever source dir files are edited
IMO it’s too much work. Try to use what’s supported in Corona instead: The Lua module system.
Dofile is not the same as a C# include, it dynamically executes code in a another file (but due to Lua scoping the effect can be similar). I believe it was disabled for security reasons - it for instance would allow an app to download Lua code from somewhere else and arbitrarily execute it. [import]uid: 58849 topic_id: 18559 reply_id: 72261[/import]