Advertisement
guitarplayer616

Environment Saver

Dec 11th, 2015
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.18 KB | None | 0 0
  1. function saveVarsToFile()
  2.     local h = fs.open("currentVars","w")
  3.     local env = getfenv()
  4.     for i,v in pairs(env) do
  5.         h.write(i)
  6.         h.write(': ')
  7.         h.writeLine(v)
  8.     end
  9.     h.close()
  10. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement