- Edited
I have this code
func save_data():
var file = File.new()
file.open("user://save", file.WRITE_READ)
file.store_var(scene)
file.close()
func load_data():
var file = File.new()
if not file.file_exists("user://save"):
return false
file.open("user://save", file.READ)
scene = file.get_var()
file.close()
return true
when i hit continue
func _on_Continue_pressed():
load_data()
get_tree().change_scene(scene)
it gives me this... Resource file not found: res://
, why is that?