hey, i was translating a code i found in a dbasic tutorial about multiplayer, it hidden in the DGSDK documentation. But im having trouble with this function, can somebody explain me how to use it:
dbChecklistString(netstr, a);
the SDK documentation says its definition is:
char* dbCheckListString ( int IntegerValue )
but in the .h of the system file says the function definition is:
(btw, the documentation looks incomplete)
DWORD dbChecklistString ( DWORD pDestStr, int iIndex );
can this be converted to a char* ?
the full code is here:
//This command will fill the checklist with the names of all
//the currently available connections on the machine
dbPerformChecklistForNetConnections();
//sample code to setup a net connection
//perform checklist for net connections
int netsel = 0;
int nettotal = dbChecklistQuantity();
char buffer[256];
sprintf(buffer, "net connections: %i", nettotal);
dbText(1, 1, buffer);
for (int a = 0; a < nettotal; a++)
{
//find the connection for TCP/IP internet
char netstr[500];
dbChecklistString(netstr, a);
if ( strcmp(netstr, "Internet TCP/IP Connection For DirectPlay") == 0)
{
netsel = a;
}
}
dbSetNetConnection(netsel, "128.0.0.1");
dbCreateNetGame("Test Game", "Sempressimo", 2);
//For CLIENTS, the game should be listed in the "game$" variable
//before they are able to join. Once a player is ready to join, use a command such as this:
dbJoinNetGame (1, "NONAME00")