Posted 08 May 2015 - 04:53 AM
Any time I try to call an api function from the loaded file I get an attempt to index a nil value error.
The environment code:
Edit: The problem only occurs when I try to use the shell API
Edit 2: This is the line that errors:
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 on 08 May 2015 - 03:35 AM