Advertisement
popatop15

Untitled

Oct 23rd, 2020 (edited)
1,744
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. function printHelp()
  2.     print("[1] Add item")
  3.     print("[2] Delete item")
  4.     print("[3] List all items")
  5.     print("[4] Change quantity of item")
  6. end
  7.  
  8. function getConfig()
  9.     local lines = {}
  10.     local h = fs.open("./", "config")
  11.     for line in h.readLine do
  12.         lines[#lines+1] = line
  13.     end
  14.     h.close()
  15.     return lines
  16. end
  17.  
  18. printHelp()
  19. local action = read()
  20.  
  21. if action == "3" then
  22.     local config = getConfig()
  23.     print(config)
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement