From b7636394b2459213d9dfba78bb31a76c0c076ac3 Mon Sep 17 00:00:00 2001 From: Noah Date: Thu, 1 Dec 2022 13:25:52 -0600 Subject: [PATCH] Fix error spam if store.json doesn't exist (Just create it) --- Store.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Store.gd b/Store.gd index cfba318..69428e3 100644 --- a/Store.gd +++ b/Store.gd @@ -11,7 +11,6 @@ var store_file = File.new() var store_paths = [OS.get_config_dir()+"/UltraFlare/"] var store_path = null - # When script/game is loaded, func _ready(): # For each path, @@ -29,7 +28,8 @@ func _ready(): # Set the data path to the first entry in the data_paths array store_path = store_paths[0] store_dir.make_dir_recursive(store_path) - store_file.open(store_path+"/store.json", 3) + store_file.open(store_path+"/store.json", 2) + store_file.close() # get_store() # Used for getting all data in storage