26.01.2014, 09:04
Ok i have the BlueG's MySQL R33 plugin and this code on OnGameModeInit:
But, while compiling i get undefined symbol "mysql_ping".
I tried to remove this line
with all the brackets but nothing.
pawn Код:
for(new connectionCount; connectionCount < MYSQL_CONNECTION_TRIES; connectionCount++)
{
mConnectionHandle = mysql_connect(SQLHost, SQLUser, SQLDatabase, SQLPassword);
if(mysql_ping(mConnectionHandle) == -1)
{
if(connectionCount == MYSQL_CONNECTION_TRIES - 1)
{
printf("The server has failed to connect to MySQL the maximum amount of times, shutting down...");
SendRconCommand("exit");
return 1;
}
else
{
printf("Failed to connect to MySQL, retrying...");
}
}
else
{
printf("The server has successfully connected to MySQL!");
mysql_debug(SQLDebug);
break;
}
}
I tried to remove this line
pawn Код:
if(mysql_ping(mConnectionHandle) == -1)