View Full Version : Additional LUA Files in a directory other than the CCF directory

June 20th, 2009, 03:19 AM
Is there a way to call LUA files from a specified location that ISN'T the CCF or NR directory, eg.

require ('\\\\littlepig\\Documents\\LUAShared\\hardware_li stmanager')

I'm trying to create a central LUA store that multiple NR clients can "share"


Rob H
June 20th, 2009, 10:35 AM
You can add a LUA_PATH environment variable or specify a Lua variable called LUA_PATH and that will be searched for any required sources.

If that isn't mentioned in the help then check http://www.lua.org/manual/5.0/

June 20th, 2009, 01:46 PM
Thanks rob
couldn't find it in the Chm (but that doesn't mean it's not there :-)

June 21st, 2009, 06:28 AM
Couldn't seem to get LUA_PATH to return anything other than nil but the following seems to work

package.path = package.path..";".."\\\\LITTLEPIG\\Documents\\LUAShared//?.lua"

Rob H
June 21st, 2009, 06:51 AM
Yes, that makes sense, although the environment variable approach should work too.