You aren’t doing any error checking there. More than one thing could be going wrong:
the file you’re trying to read could be missing, or inaccessable due to permissions problems – this could be as simple as the path being wrong or the name spelled incorrectly (potentially including capitalization on some platforms)
there might not be a variable in the file to read, so the file could be open and readable, but you’re trying to read something that’s not there
It seems like _file.get_var() is still returning null. Make sure the file .Chucho_01 actually exists in the user directory, and that both the file name and its contents are correct. Sometimes the file can get corrupted if it was saved incorrectly.
To check the file manually, go to:
AppData > Roaming > Godot > app_userdata > [your project name] in file manger
Or, a quicker way [recommend]: In Godot “Editor” tab, select “take screenshot”, it will open the project’s directory automatically where you can see if the saved file, .Chucho_01 exists and its data/value isnt empty .
If the file contains more than just the int and the int isn’t stored at the beginning of the file, you’d also have to move the file cursor to the int’s position before you can read it.