Posted 03 November 2014 - 01:46 AM
Okay, so I have been trying to save items to a table. Currently, I am trying to save a serialized table to a file. Code:
local tabl = {"i1" = {iType = "Bread", amount = "5", price = 1, sId = 84},"i2" = {iType = "Wheat", amount = "64", price = 2, sId = 0}, "i3" = {iType = "Seeds", amount = "4 1/2 Stks", price = 5, sId = 0}}
file = fs.open("shop", "w")
file.write(textutils.serialize(tabl))
file.close()
print("h")
error()
After that, I get the error "bios:339: [string "startup"]:1: "}" expected." The table is fine, and I see no error. Any help would be appreciated, thanks.