Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | loloid |
Hi,
I’m making a game in gdscript in which i made a save system that work like this :
const filepath = "res://save/lists.save"
func load_list():
var file = File.new()
if not file.file_exists(filepath): return
file.open(filepath, File.READ)
saved_list = file.get_var()
file.close()
pass
func save_list():
var file = File.new()
file.open(filepath, File.WRITE)
file.store_var(saved_list)
file.close()
pass
In my file, i store a list of array. This code seems to work if i use it in the engine. But when i’m exporting my game, it doesn’t work anymore. I can use the array that i did in the engine, when i use “save_list()” it works when i’m in the game but as soon as i close the game, “lists.save” return as when i exported the game.
I’m sorry if i’m not clear, i’m not native English speaker so i hope you’ll understand.
loloid