views:

372

answers:

1

I have lua embedded in my game engine and a directory structure of lua files, and i am starting to use lots of lua scripts. I want to use "requrie" to optimize module includes, but i am unsure how to set the CPATH and PATH values because i have lua embedded. How can I set this up?

And also, since require looks for modules and not paths, can i use a * to look in all sub-folders of a folder, and does it look inside each lua file? and can the lua module files be "compiled" with the structure?

Thanks!

+5  A: 

You can set package.cpath and package.path. Wildcards are not supported in paths.

lhf
I didnt realize these values were represented in the lua environment, thanks a bunch!
Joe