Little help with GUI/$Pref's.
by Jason Stevens · in Torque Game Engine · 05/21/2008 (5:48 pm) · 2 replies
Hey all.
I am working on a menu that will go through a 'login' before it either logs you in, or if you dont exist, takes you to character generation.
Now, everything works fine for the most part. I have a function in client\init.cs:
function CheckForPlayer()
{
%filename = "./Saves/" + $pref::Player::Name + ".cs";
When it hits the $pref::Player::Name, its always null. No matter what. However, normal prefs.cs sets just fine with the name (and other fields). For some reason that one function wont use it. Any help on this one is appreciated.
I am working on a menu that will go through a 'login' before it either logs you in, or if you dont exist, takes you to character generation.
Now, everything works fine for the most part. I have a function in client\init.cs:
function CheckForPlayer()
{
%filename = "./Saves/" + $pref::Player::Name + ".cs";
When it hits the $pref::Player::Name, its always null. No matter what. However, normal prefs.cs sets just fine with the name (and other fields). For some reason that one function wont use it. Any help on this one is appreciated.
About the author
#2
05/21/2008 (6:08 pm)
Thanks man. That did the trick. Its always something stupid and tiny like that. Haha.
Torque Owner Mquaker
Mquaker Studio
function CheckForPlayer() { %filename = "./Saves/" [b]@[/b] $pref::Player::Name [b]@[/b] ".cs"; }Then try again.