[Opentnl-general] TNL_IMPLEMENT_RPC Build Error
Brought to you by:
mark_frohnmayer,
s_alanet
From: Bren <br...@sa...> - 2005-03-30 09:40:05
|
I=B4m having a problem building a GhostConnection subclass. NetworkConnection.h #ifndef _NETWORKCONNECTION_H_ #define _NETWORKCONNECTION_H_ class NetworkConnection : public TNL::GhostConnection { typedef TNL::GhostConnection Parent; public: TNL_DECLARE_NETCONNECTION(NetworkConnection); // declare the client to server message TNL_DECLARE_RPC(rpcMessageClientToServer, (const char *theMessageString)); // declare the server to client message TNL_DECLARE_RPC(rpcMessageServerToClient, (const char *theMessageString)); }; #endif NetworkConnection.cpp #include "NetworkIncludes.h" TNL_IMPLEMENT_NETCONNECTION(NetworkConnection, TNL::NetClassGroupGame, true); TNL_IMPLEMENT_RPC(NetworkConnection,=20 rpcMessageClientToServer,=20 (const char * messageString),=20 (messageString), TNL::NetClassGroupGameMask,=20 TNL::RPCGuaranteedOrdered,=20 TNL::RPCDirClientToServer,=20 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!"); } TNL_IMPLEMENT_RPC(NetworkConnection,=20 rpcMessageServerToClient,=20 (const char * messageString), (messageString), TNL::NetClassGroupGameMask,=20 TNL::RPCGuaranteedOrdered,=20 TNL::RPCDirServerToClient,=20 0) { // display the message the server sent printf("Got a message from server: %s\n", messageString); // once the client has heard back from the server, it should quit. // gQuit =3D true; } The build error: d:\Project\tnl\tnl\tnlMethodDispatch.h(85) : error C2664: =B4bool TNL::BitStream::read(TNL::ByteBuffer *)=B4 : cannot convert parameter 1 from =B4const char ** =B4 to =B4TNL::ByteBuffer *=B4 Types = pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast This is based on the Hello World sample, but changed from EventConnection to GhostConnection. I poured through the TNLTest source and didn't see any significant differences. Any suggestions? --=20 I am using the free version of SPAMfighter for private users. It has removed 28057 spam emails to date. Paying users do not have this message in their emails. Try www.SPAMfighter.com for free now! |