06.06.2015, 22:18
Well yeah, you can't have two "else" within the same scope. Do it like this, though:
PHP код:
new connectionCount = 1;
do
{
printf("connecting, attempt %d / %d", connectionCount, MYSQL_CONNECTION_TRIES);
mConnectionHandle = mysql_connect(...);
}
while(!mConnectionHandle && connectionCount++ < MYSQL_CONNECTION_TRIES);
if(!mConnectionHandle)
{
// failed to connect shiz
return 0;
}
// rest of gamemodeinit