Advertisement
mathiaas

getPos

Dec 23rd, 2019 (edited)
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.25 KB | None | 0 0
  1. if not fs.exists("/.pos") then
  2.     io.open("/.pos","w")
  3. end
  4.  
  5. file = fs.open("/.pos", "r")
  6.  
  7. local rLines = {}
  8. local sLine = file.readLine()
  9. while sLine do
  10.     table.insert(rLines, sLine)
  11.     sLine = file.readLine()
  12. end
  13. file.close()
  14.  
  15. return sLine
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement