lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

Say I'm executing my C++ host application in a directory "base".
Then a Lua file is loaded from "base/modules" and executed.
This file "require"s other lua files there.
But the search path seems to be "base", and thus the file isn't included.
So how do i tell the Lua environment where to start searching for files when it encounters "require" in scripts?
I hope this can be set by lua_state individually, since i will be loading several Lua scripts in parallel, each based in a different directory.

regards,
Lars R.