Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local success = os.loadAPI("itemData")
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.white)
- local tbl = (success and itemData.data) or {}
- repeat
- print("Name")
- local name = read()
- print("Price")
- local price = read()
- print("Location")
- local location = read()
- print("Info")
- local info = read()
- table.insert(tbl,{name = name,price = price,location = location,info = info})
- until name == "quit"
- table.remove(tbl,#tbl)
- local h = fs.open("itemData","w")
- h.write("data = "..textutils.serialize(tbl))
- h.close()
Add Comment
Please, Sign In to add comment