extends Node func saveJSON(savePath, saveData): var jsonString = JSON.stringify(saveData) var fileAccess = FileAccess.open(savePath, FileAccess.WRITE) if not fileAccess: print("An error happened while saving data: ", FileAccess.get_open_error()) return 1 fileAccess.store_line(jsonString) fileAccess.close()