Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- Get user balance
- args = {...}
- if not #args == 1 then return false end
- local file = fs.open("banking/database/users", "r")
- if file then
- tLines = {}
- sLine = file.readLine()
- while sLine do
- table.insert(tLines, sLine)
- sLine = file.readLine()
- end
- file.close()
- end
- for i = 1, #tLines do
- if string.find(tLines[i], args[1]) then
- local d = {}
- for word in string.gmatch(tLines[i], "([^:]+)") do
- table.insert(d,word)
- end
- return d[2]
- end
- end
- return false
Add Comment
Please, Sign In to add comment