Posted 10 March 2012 - 06:46 AM
In manual:
but in bios.luadofile ([filename])
Opens the named file and executes its contents as a Lua chunk. When called without arguments, dofile executes the contents of the standard input (stdin). Returns all values returned by the chunk. In case of errors, dofile propagates the error to its caller (that is, dofile does not run in protected mode).
dofile = function( _sFile )
local fnFile, e = loadfile( _sFile )
if fnFile then
setfenv( fnFile, getfenv(2) )
fnFile() --Why not "return fnFile()" here?
else
error( e )
end
end
Why function do not return anything?