Advertisement
Guest User

make-id-file

a guest
Mar 2nd, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.28 KB | None | 0 0
  1. local h = fs.open("id", "w")
  2. textutils.slowWrite("enter the id of the door control computer: ",10)
  3. id = read()
  4.  
  5. h.write(id)
  6.  
  7. h.close()
  8.  
  9. local w = fs.open("id", "r")
  10. id3 = w.readLine()
  11. id2 = tonumber(id3)
  12. textutils.slowPrint("the id written to file is: "..id2)
  13.  
  14. w.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement