0 votes

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....

in Engine by (824 points)

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 ?

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!

1 Answer

+3 votes
Best answer

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

by (824 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.