Agent_Silence

terminalmake

Dec 20th, 2015
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. local success = os.loadAPI("itemData")
  2. term.clear()
  3. term.setCursorPos(1,1)
  4. term.setTextColor(colors.white)
  5. local tbl = (success and itemData.data) or {}
  6. repeat
  7. print("Name")
  8. local name = read()
  9. print("Price")
  10. local price = read()
  11. print("Location")
  12. local location = read()
  13. print("Info")
  14. local info = read()
  15. table.insert(tbl,{name = name,price = price,location = location,info = info})
  16. until name == "quit"
  17. table.remove(tbl,#tbl)
  18. local h = fs.open("itemData","w")
  19. h.write("data = "..textutils.serialize(tbl))
  20. h.close()
Add Comment
Please, Sign In to add comment