Beginner-DP8-Server-Problem

Started by
2 comments, last by cruiz 22 years, 3 months ago
Hi People! I''m working right now the first time with DirectPlay. I''ve bought a book last week: "Multiplayer Game programming". Its a good book. Ok..now i tried to make a simple Serverinitialisation. Not more. Only initialisating a Server. And my pro gives me an error on this: ////////////// DXUtil_ConvertGenericStringToWide( wszServerName,"GAME Server"); ZeroMemory( &dpPlayerInfo, sizeof(DPN_PLAYER_INFO)); dpPlayerInfo.dwSize = sizeof(DPN_PLAYER_INFO); dpPlayerInfo.dwInfoFlags= DPNINFO_NAME; dpPlayerInfo.pwszName = wszServerName; if(FAILED( hReturn = g_pDPServer->SetServerInfo( &dpPlayerInfo, NULL, NULL, DPNSETSERVERINFO_SYNC))){ chrigiFile << "SET SERVER INFO FAILED!" << endl; return 0; } //////////// chrigiFile is my "logfile" where I write what happens in game. The SetServerInfo returns an error. Have I everything forget for the SetServerInfo?? That''s all the code belonging the SetServerinfo. Hope to see answers: ) C.Ruiz
Advertisement
try adding to the structure definition before the SetServerInfo call:

  dpPlayerInfo.dwPlayerFlags = 0;  


The docs recommend to do this with a DP8Server object..

Learn about game programming!Games Programming in C++: Start to Finish
THANKS THANKS THANKS!!
It works now!
Yes the flag!
Uhhh!
But now it works!!
Thansk thanks thanks!
Greets to all out there:
C.Ruiz
np Cruiz...glad to be of service.
Learn about game programming!Games Programming in C++: Start to Finish

This topic is closed to new replies.

Advertisement