Advertisement
freacknate09

ID.lua

Jul 9th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. local computer = require("computer")
  2. local fs = require("filesystem")
  3. local os = require("os")
  4. local serialization = require("serialization")
  5.  
  6. input = nil
  7. exists = nil
  8. item_serial = nil
  9. exists = fs.exists("/home/ID/file.txt")
  10. if exists == true then
  11. fs.remove("/home/ID/file.txt")
  12. end
  13.  
  14.  
  15. items = {}
  16. input = io.read()
  17. items[1] = toadd
  18. items_serial = serialization.serialize(items)
  19. file = io.open("/home/ID/file.txt","w")
  20. file:write(items_serial)
  21. file:close()
  22.  
  23. print("serialized")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement