The environment code:
local program = {}
setmetatable(program, {__index = getfenv(1)})
local prog, err = loadfile(path)
setfenv(prog, program)
prog()
Edit: The problem only occurs when I try to use the shell API
Edit 2: This is the line that errors:
local sPath = shell.resolve( tArgs[1] )
Edited by minecraftwarlock, 08 May 2015 - 04:35 AM.











