diff --git a/localdb.lua b/localdb.lua index 7c48a5d..d04a491 100644 --- a/localdb.lua +++ b/localdb.lua @@ -1,4 +1,9 @@ local db = {} +if not fs.exists("data.db") then + local file = fs.open("data.db", "w") + file.write("{}") + fs.close() +end local file = fs.open("data.db","r+") if not file then error("failed to open db file") end