Saving a save file after deleting a game

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

(Sorry for the broken English, I’m using a translator) I’m working on an android project where I would like to save. In general, they are already ready, and they save correctly, but after deleting the game, all data is lost, despite the checkboxes “save user data” when exporting. Below is my code that I use for the saves themselves

var saves_file = ProjectSettings.globalize_path(OS.get_user_data_dir().plus_file(“”))

func load_save():
var f =
if f.file_exists(saves_file):
if, File.READ) == OK:
items_inventory = f.get_var()
is_saves_load = true
is_saves_load = true

func save_save():
var f =
if, File.WRITE) == OK:

:bust_in_silhouette: Reply From: ShatteredReality

Check “retain data on uninstall”… although I’m not sure if you did check that and you just translated it from another language?