Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local c = 0
- while true do
- local fenv = getfenv(c)
- if fenv == nil then break end
- local file = fs.open("fenv_"..c,"w")
- local funcs = {}
- local other = {}
- for k,v in pairs(fenv) do
- if type(v) == "function" then funcs[k] = v
- else
- other[k]=v
- end
- end
- file.writeLine("--Functions")
- str = ""
- for k,v in pairs(funcs) do file.writeLine(k) end
- str = ""
- file.writeLine("--OTHER")
- for k,v in pairs(other) do file.writeLine( k.."("..type(v)..")".."=>"..(type(v) == "table" and tostring(v) or v) ) end
- file.close()
- c=c+1
- end
Add Comment
Please, Sign In to add comment