[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Newbie question
- From: "Korn, Dan" <dkorn@...>
- Date: Wed, 2 Apr 2003 19:04:45 -0600
I'm trying to test simple scripts with the 4.0 lua.exe and luac.exe programs
on Windows. I take a simple script like so:
i = 0
if i then
print(1)
else
print(2)
end
And save it to a text file called LuaTest.txt.
The script file compiles just fine with luac (although I have no clue what
to do with the output file).
If I send the file to lua (lua < luatest.txt), I get a bunch of errors:
> > error: `end' expected;
last token read: `<eof>' at line 1 in string "if i then"
> 1
> error: <eof> expected;
last token read: `else' at line 1 in string "else"
> 2
> error: <eof> expected;
last token read: `end' at line 1 in string "end"
What gives? How can I test the script and see the output without putting
all of my if statements on a single line?
Thanks,
Dan