Preventing Loading of a Mission
by Eric Clausing · in Torque Game Engine · 03/10/2007 (1:24 pm) · 1 replies
I am trying to have my clients register before they play. Here is what I have. I have added a button on the main menu that says Register. When you click on it the button loads up another GUI that has Username and Password in it along with a button that says Register. When I click register it does the following command.
Here is the connect function JIC it helps.
Now as soon as I hit Register it starts in on the loading progress screen. Within a second though it pops up a dialog box that says Account was Registered. Thx. Here is the part of the server script it is calling that from.
Which is loading this function.
What I am wanting to do is stop it from loading any mission and just return the box.
Thanks
function createAccount()
{
if(!isObject(ServerConnection))
{
connect($Pref::Primary::Server);
schedule(1000,0,createAccount);
return;
}
CommandToServer('CreateAccount',$Pref::Account::Name,md5($Pref::Account::Password));
}Here is the connect function JIC it helps.
function connect(%server)
{
if(!isObject(ServerConnection))
{
echo("Server is "@%server);
new GameConnection(ServerConnection);
ServerConnection.connect(%server);
$localAdmin = false;
}
}Now as soon as I hit Register it starts in on the loading progress screen. Within a second though it pops up a dialog box that says Account was Registered. Thx. Here is the part of the server script it is calling that from.
CommandToClient(%client, 'HandleMSG',"MSGACCOUNTCREATESUCCESS");
Which is loading this function.
function ClientCmdHandleMSG(%msg)
{
%msg = detag(%msg);
switch$(%msg)
{
case "MSGACCOUNTCREATESUCCESS":
MessageBoxOK("Success!", "Your Account has been created!");
//should bring back to MainMenu automagically
etc...What I am wanting to do is stop it from loading any mission and just return the box.
Thanks
Torque 3D Owner Eric Clausing