reading High Score (saved in CFG file) works in debug mode but not release mode?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Robster
:warning: Old Version Published before Godot 3 was released.

Hi all,

I’m not sure what the best move is here. I’m JUST about to release my first game.
It’s all working fine in debug mode (running from within Godot).

When I build though (android and OS X) the score being written to the options.CFG file doesn’t seem to work.

Is there some option that I need to tick, a permission thing or similar? I don’t know where to look to be honest.

Thanks so much…

Where are you saving this file? Do you use the user:// storage location as suggested in http://docs.godotengine.org/en/stable/tutorials/engine/saving_games.html#saving-and-reading-data ?

Zylann | 2016-12-01 02:24

ahhh no I’m not! I’m using

var file_to_save= "res://configuration.cfg"

So it’s that easy. I’ll go check it out when in front of PC and get back. Thank you!

Robster | 2016-12-01 02:33

:bust_in_silhouette: Reply From: Robster

Credit goes to Zylann for the correct answer.
For future reference to help others here it is:

var file_to_save= "user://configuration.cfg"

(I was using var file_to_save= "res://configuration.cfg"). It’s now saving and retrieving the data from the file on android and mac when built. Thanks Zylann. Much appreciated