Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function saveToFile(file,tbl)
- local hand = fs.open(file,"w")
- for i=1,#tbl do
- hand.write(tbl[i])
- end
- hand.close()
- end
- function loadFromFile(file)
- local hand = fs.open(file,"r")
- local n = {}
- repeat
- local ln = hand.readLine()
- if ln then table.insert(n,ln) end
- until not ln
- return n
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement