Client command not being sent by server?
by Mike Stoddart · in Torque Game Engine · 06/03/2002 (6:11 pm) · 4 replies
Ok, this one is driving me nuts. In fps/server/srcipts/game.cs, there is the following code plus a debug statement:
And in fps/client/scripts/game.cs there is the following code, plus debug statement:
What's confusing me is that "SERVER GAME START" is displayed, but "CLIENT GAME START" is not. So my deduction from this is that the client doesn't receive this message. What's even more confusing is that this is original Torque code, it isn't something I've added.
Could someone check their game and confirm it works for them?
Thanks a lot!
function startGame()
{
echo("SERVER GAME START");
if ($Game::Running) {
error("startGame: End the game first!");
return;
}
// Inform the client we're starting up
for( %clientIndex = 0; %clientIndex < ClientGroup.getCount(); %clientIndex++ ) {
%cl = ClientGroup.getObject( %clientIndex );
commandToClient(%cl, 'GameStart');
// Other client specific setup..
%cl.score = 0;
}And in fps/client/scripts/game.cs there is the following code, plus debug statement:
function clientCmdGameStart(%seq)
{
echo("CLIENT GAME START");
PlayerListGui.zeroScores();
}What's confusing me is that "SERVER GAME START" is displayed, but "CLIENT GAME START" is not. So my deduction from this is that the client doesn't receive this message. What's even more confusing is that this is original Torque code, it isn't something I've added.
Could someone check their game and confirm it works for them?
Thanks a lot!
#2
Are the code changes C++ changes, or script changes?
Thanks
06/03/2002 (6:36 pm)
I'm not sure what version I've been using; it's been a while since I got the latest CVS version.Are the code changes C++ changes, or script changes?
Thanks
#3
06/03/2002 (6:48 pm)
The changes relating to the game initialization were in script code.
#4
06/03/2002 (6:59 pm)
Ok thanks; I'll check those out.
Torque Owner Tim Gift