Sign in to follow this  
Kavana

Raknet Problem [solved]

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this