[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Compat-5.1 very broken.
- From: whisper@...
- Date: Sat, 23 Apr 2005 10:34:19 -0700
Tiago Dionizio wrote:
On 4/22/05, email@example.com <firstname.lastname@example.org> wrote:
To specify a file name in LUA_INIT, the string needs to start with a @
char, or else it will be interpreted as a lua script.
lua: LUA_INIT:1: `<name>' expected near `/'
Here it tried to execute the lua script with contents
"e:/lua/lua-5.1w5/bin/compat-5.1.lua" which is not valid sintax...
The system cannot find the file specified.
The problem here is the use of '<' and '>' which will tell the windows
console to interpret as redirection files. It will try to read from
file "ROOT" and output the result of the command "set LUA_INIT=@" into
"/compat-5.1.lua". Since the file ROOT was not found nothing was
You should have typed "set LUA_INITemail@example.com".
I hope this helps you understand what you were doing wrong.
For more information, see: http://www.lua.org/manual/5.0/manual.html#6
"Before running any argument, the interpreter checks for an
environment variable LUA_INIT. If its format is @filename, then lua
executes the file. Otherwise, lua executes the string itself."
Thanks for the clarification on LUA_INIT!
While my copy of the Lua book is dog-eared I've read it so much, I'm
still new to Lua (old in the ways fo programming though! ;))
I used the @<ROOT> idiom because I think that's what the LuaSocket doc
said to do. Not knowing any better, I followed it to the letter where I
should have recognized the spirit. Some days the force just isn't with me ;)
With your explanation and a more rested pair of eyes, I can see that
LuaSocket's doc is fine and it's my error.
Seattle, WA USA