Why don't functions work for me when exporting?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By sava13331

my whole problem is that I don’t know how to make the project create a directory and save the save file and load this save

    func save():
		var new_save = preload("res://matireals/scripts/save_script/save_script.gd").new()
		var dir=Directory.new()
		if !(dir.dir_exists("matireals/saves/")):
			print("ERR: dir does not exist ")
	func verif_save(w_save):
		for v in save_vars:
			if w_save.get(v)==null:
				return false
		return true
	func load_save():
		var dir=Directory.new()
		if not dir.dir_exists("res://matireals/saves/"):
			return false
		var load_s=load("res://matireals/saves/"+namew+".tres")
		if not verif_save(load_s):
			return false
		return true

:bust_in_silhouette: Reply From: Ertain

Have you looked at the article on saving games in the documentation? You may have to use the user:// path prefix when saving and loading files.