Game Development Community

Prefs hell

by Howard Dortch · in Torque Game Engine · 07/13/2007 (12:08 pm) · 3 replies

I have an edit box much like the player name on the same dialog (startmissiongui)

the Variable = "pref::player::name" does not have a $ in front of it so I did the same thing for my edit box. I have a edit box with Variable = "pref::Game::Info";

Now when I change the player name, exit the game, then run the game again the new name is there.

when I change the Game Info, exit the game, then run the game again it's reset to what it was in the prefs.

Can someone explain what sort of magic will allow me to save my Game Info data?

#1
07/13/2007 (1:28 pm)
Only thing that comes to mind is that there is another location where pref::Game::Info is being loaded when you restart your game and resets your new info.

If you have that particular $pref exported on exit and then loaded (after any default values of it) when you start your game, then it should show it as you expect it.
#2
07/13/2007 (3:21 pm)
It is only referenced in one place.
Does the $ have anything to do with it?
most prefs things are referenced using $Prefs::something
#3
07/13/2007 (3:39 pm)
Alway add the $ prefix... in some places it appears to be optional, but don't count on it.