Advertisement
Guest User

savemanager

a guest
Oct 20th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. function searchPC(id)
  2.   local h = fs.open("save", "r")
  3.   local line = h.readLine()
  4.   while(line ~= nil) do
  5.     local vrgs = {}
  6.     local b = 1
  7.     for word in string.gmatch(line, '([^|]+)') do
  8.       vrgs[b] = word
  9.       b = b+1
  10.     end
  11.     if vrgs[1] == id then
  12.       return vrgs[2]
  13.     end
  14.     line = h.readLine()
  15.   end
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement