[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: dofile
- From: "Aaron Brown" <aaron-lua@...>
- Date: Fri, 15 Jul 2005 10:00:29 -0400
> dofile() does not pass parameters to the chunk as Luiz
> points out.
> As he pointed out, use loadfile in that case.
Only in 5.1, though, right? In 5.0 you have to have a
function within the loadfile'd file that takes arguments.
-- (No error checking.)
local filefunc = loadfile("loadfilefile.lua")
local returnedfunc = filefunc()
local result = returnedfunc(arg1, arg2, arg3)