0 votes

Somewhere in my game code I have this line:

my_game_settings.parse_json(file.get_as_text())

where the file has the path 'res://settings.cfg'. I am choosing not to save to user:// since this isn't a game save but something only internal.

In the editor when playing the scene, it works just fine & loads the file with no errors.
However, when I build an .exe I get the error:

ERROR: _File::get_as_text: Condition ' !f ' is true. returned: String()
At: core\bind\core_bind.cpp:1582

I superstitiously tried changing everything! It won't budge! Same error & I don't understand C++ to know why.

in Engine by (43 points)

1 Answer

0 votes
Best answer

Just a guess, but is the settings.cfg exported? Try to add it to the resources export list in the Resources tab of the export dialog.

by (306 points)
selected by

Yup fixed, thanks.

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.