ServerCmd doesn't work....
by Suryadiputra Liawatimena · in Torque Game Engine · 09/05/2005 (6:26 am) · 1 replies
I have defined a function in my common/server/commands.cs just like this
then i called it from control/client/misc/loginscreen.cs just like this :
now why the heck, the echo ("\n++++++++++++++ Entering ServerCmdLOGIN ++++++++++++++++++++"); doesn't appear in my console.log, and the specified function is not called at all......... something is definetly very wrong with this... please help me guys..
function serverCmdLogin (%client, %username, %password) {
echo ("\n++++++++++++++ Entering ServerCmdLOGIN ++++++++++++++++++++");
%query = "SELECT password FROM tge WHERE username = '" @ %username @ "'" ;
%result = $db.Execute (%query);
if (!%result) return 0;
if (%result.password !$= %password) return 0;
return 1;
}then i called it from control/client/misc/loginscreen.cs just like this :
echo ("\n++++++++++++++ Before Calling ServerCmdLOGIN ++++++++++++++++++++");
commandToServer ('Login', $pref::player::name, $client::password);now why the heck, the echo ("\n++++++++++++++ Entering ServerCmdLOGIN ++++++++++++++++++++"); doesn't appear in my console.log, and the specified function is not called at all......... something is definetly very wrong with this... please help me guys..
About the author
Torque Owner Vincent BILLET
Default Studio Name