Game Development Community

Saving $pref's

by Brandon Mueller · in Torque Game Builder · 02/08/2009 (6:06 pm) · 1 replies

Hey,

I'm making a game in TGB and want to save out $pref's that I create and was wondering how I can get them to save in the prefs.cs that I created. I know in TGE there's a line that exports everything into the .cs file in the onExit() function:

export("$pref::*","./preferences/prefs.cs",false);

But TGB does not have this line and I tried adding it and it does nothing. Is saving out to the commonConfig.xml the only way now?

About the author

Recent Threads


#1
02/12/2009 (5:01 am)
Try

export( "$Pref::*", expandFilename("./preferences/prefs.cs"), false );

TGB (on vista) will likely create this file in %APPDATA%/Your Company Name/ rather than the development directory, make sure you're looking in the right place for it.