Advertisement
willwac

Table API (DuoStep)

Sep 18th, 2013
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None | 0 0
  1. function save(t,l)
  2.   file = fs.open(l,"w")
  3.   file.write(textutils.serialize(t))
  4.   file.close
  5. end
  6.  
  7. function load(t,l)
  8.   file = fs.open(l,"r")
  9.   _G[t] = textutils.unserialize(file.readLine())
  10.   file.close()
  11. end
  12.  
  13. function copy(t,n)
  14.   _G[n] = textutils.serialize(t)
  15.   --if it doesn't work, tell me, i'll fix it. It should work though.
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement