0 votes

Every time I try to use the ConfigFile.get_value()-function it returns null for no apparent reason. Code is like so:

    var loadgame = ConfigFile.new()
    var player_name = loadgame.get_value("general","player name")

I also get a very weird error: Condition ' value[p_section].has(p_key) ' is true. returned: p_default

Isn't that telling me that a value was found but for whatever reason the default value was returned anyway? It does in fact return the default value, I checked that by changing it.

Thanks in advance for the help.

in Engine by (12 points)

Sorry for wasting your time. Answered it myself: a section key cannot have spaces, apparently (although I think I've seen that in examples).

But if anyone is up to it, what is that error telling me exactly? Just interested.

Please log in or register to answer this question.

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 Frequently asked questions and 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 [email protected] with your username.