[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: extending lua load path
- From: Oliver Mueller <oliver.mueller@...>
- Date: Mon, 14 Nov 2011 17:47:39 +0100
I have a lua interpreter embedded in my program and want to execute
The scripts are located in folder "scripts". One script requires
another like this:
Now when I call my executable from within the "script" directory,
everything is fine since "." is in the Lua load path.
But when I call it from anywhere else, the require "base" is not found:
run-error - [string "script/myscript.lua"]:1: module 'base' not found..
In ruby I can resolve this issue by adding the directory of the
myscript.lua file to the load path:
Can anybody tell me how I this is done in Lua?