• Advertisement
Sign in to follow this  

Raknet Problem [solved]

This topic is 4758 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm having a problem whenever I put an RPC function in a class, whenever I compile I get the following errors, Anyone know what's the problem, I would like to post in the rakkarsoft forums, but they are down unfortunately. e:\FYP Assignment\NetworkInterface.cpp(52): error C2664: 'RakClientInterface::RegisterAsRemoteProcedureCall' : cannot convert parameter 2 from 'void (char *,int,PlayerID)' to 'void (__cdecl *)(char *,int,PlayerID)' [Edited by - Kavana on February 9, 2005 10:21:12 AM]

Share this post


Link to post
Share on other sites
Advertisement
I'm rather new to raknet so I'm not really sure whether I'm doing right, doing this for a school project.

Anyway I have a class called NetworkInterface, there is one RPC function called registerPlayer. I have another function to register the RPC as well as do other stuff, I followed the same parameters, but I can't seem to get it running, is there any other way to make it function in a class, because I want to hook it up to my game component without mixing them all up. thanks.

registerPlayer

void NetworkInterface::registerPlayer(char *input, int numberOfBitsOfData, PlayerID sender)



and the clientRun function

//! Function for client to run (simplified to make easy connectivity)
void NetworkInterface::clientRun()
{
// Initialise the client
rakClient=RakNetworkFactory::GetRakClientInterface();
Multiplayer<RakClientInterface> rakClientMultiplayer;

// Register RPC function
REGISTER_AS_REMOTE_PROCEDURE_CALL(rakClient, registerPlayer);
..................................
............................




Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement