[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua_dofile()/pcall() results are not on stack?
- From: Etan Reisner <deryni@...>
- Date: Wed, 18 Jul 2007 19:46:29 -0400
I think the standard response to something like this is to do something like:
line = read_input()
chunk,err = loadstring("return "..line)
if not chunk then
-- That didn't work, try without the return.
chunk,err = loadstring(line)
if not chunk then
send_error_to_user(err)
return
end
end
chunk()
give or take a bit.
Someone correct me if I'm wrong.
-Etan