Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | korayozbay |
Hi,
I am trying to implement save/load data from a file following a tutorial (https://www.youtube.com/watch?v=2U3iiqd4Wjg&list=PL4vbr3u7UKWqwQlvwvgNcgDL1p_3hcNn2&index=56) but it fails. When I print the error, it just says 7. How can I know what error 7 means? This is the code:
onready var path = "user://save.dat"
func load_data():
var file = File.new()
var err = file.open(path, File.READ)
if err != OK:
print("error opening data file")
print(str(err))
return default_level_info
var read = {}
read = file.get_var()
return read