Skip to main content
GameDev.net gamedev.net
🔒 Locked

Beginner-DP8-Server-Problem

Started by cruiz Dec 25, 2001 at 9:57 AM 2 replies 400+ views
Original Post
cruiz
cruiz
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
wazoo69
wazoo69
try adding to the structure definition before the SetServerInfo call:

  
dpPlayerInfo.dwPlayerFlags = 0;



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

cruiz
cruiz
THANKS THANKS THANKS!!
It works now!
Yes the flag!
Uhhh!
But now it works!!
Thansk thanks thanks!
Greets to all out there:
C.Ruiz

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.