Hi, i started using multisync today, but i am having a problem... I created server and client apps, and i am able to host a game in the server app, but cant connect to it with client on another computer. Maybe that is because i have a router, and i could have some ports blocked. Besides, there is no documentation about that in C++...
Client:
#include "DarkGDK.h"
#include "multisync.h"
int result;
char ip[50] = "127.0.0.1"; //the same as in server
void DarkGDK ( void )
{
dbSyncOff();
dbAutoCamOff();
result = NetConnect(ip);
if(!result)
{
dbText(0,0,"Couldnt connect to server");
dbWaitKey();
return;
}
dbSyncOn ( );
dbSyncRate ( 60 );
while ( LoopGDK ( ) )
{
dbText(0,10,"Connected");
dbText(0,30,dbStr(NetGetPlayerAmount()));
dbSync ( );
}
return;
}
Server:
#include "DarkGDK.h"
#include "multisync.h"
int result;
char erro[512];
char ip[50] = "127.0.0.1";
void DarkGDK ( void )
{
dbSyncOff();
dbAutoCamOff();
result = NetHost_IP(2,ip);
if(!result)
{
dbText(0,0,"Coudnt create server");
}
dbSyncOn ( );
dbSyncRate ( 60 );
while ( LoopGDK ( ) )
{
dbText(0,10,"Server successfuly created !");
dbText(0,30,dbStr(NetGetPlayerAmount()));
dbSync ( );
}
return;
}
Btw, how does NetGetError() work ? It doesnt return a string or something...