ok, i pretty much don't understand the network connections at all with this. once i connect to a game i will be fine, but i cant even begin to get that up and running! Here is the code that i wrote just to mess with this:
To host a game:
void HostGame (void)
{
dbPrint ("Please enter the name of the net game: ");
char *game_name = dbInput ();
dbPrint ("Please enter the player's name: ");
char *player = dbInput ();
dbPrint ("Please enter the max number of players: ");
char *num_players = dbInput ();
int players = atoi (num_players);
State (game_name);
State (player);
dbCreateNetGame (game_name, player, players);
}
To join the game:
void JoinGame (void)
{
dbPrint ("Please enter the game to join: ");
char *game_name = dbInput ();
dbPrint ("Please enter the player's name: ");
char *player = dbInput ();
State (game_name);
State (player);
dbPerformChecklistForNetSessions ();
int a = 0;
bool found = false;
while (a < 255)
{
dbPrint (dbChecklistString (a));
if (!strcmp (dbChecklistString (a), game_name))
{
found = true;
break;
}
a++;
}
if (found)
{
dbJoinNetGame (a, player);
}
}
The hosting seems to work fine, but the game crashes every time i try to execute the join portion. and why does the host code give a dialog box asking for an ip address??
I should probably add that the host code works in the debugger, but when i try to execute it outside of the debugger for testing, it fails and a message box comes up saying "Error 6"