Game Development Community

A question about TNL basic sample

by Beyondlwm · in Torque Game Engine · 08/13/2007 (8:50 am) · 1 replies

TNL_IMPLEMENT_RPC(SimpleEventConnection, rpcMessageClientToServer, (const char *messageString),
NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 0)
{
// display the message the client sent
printf("Got message from client: %s\n", messageString);
// send a hello world back to the client.
rpcMessageServerToClient("Hello, World!");
}


it says that the function lost a parameter,but I don't know where the mistake is.
I followed the sample on te TNL web

About the author

Recent Threads


#1
09/18/2007 (10:36 pm)
You need to repeat the name of the parameter (the macro can't parse out the param name) like this:

TNL_IMPLEMENT_RPC(SimpleEventConnection, rpcMessageClientToServer, (const char *messageString),
(messageString), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 0)
{ ... }