30.12.2009, 12:56
Guy's i got a problem , When the serv attempts to connect to mysql it fails but when i use adrelina DJ it succeds ..
Here's the line i modified to fit G-stylez..
Help please :P
Here's the line i modified to fit G-stylez..
pawn Код:
public MySQLConnect(sqlhost[], sqluser[], sqlpass[], sqldb[]) // by Luk0r
{
print("MYSQL: Attempting to connect to server...");
mysql_connect(sqlhost, sqluser, sqlpass, sqldb);
if(mysql_ping()==0)
{
print("MYSQL: Database connection established.");
return 1;
}
else
{
print("MYSQL: Connection error, retrying...");
mysql_connect(sqlhost, sqluser, sqlpass, sqldb);
if(mysql_ping()==0)
{
print("MYSQL: Reconnection successful. We can continue as normal.");
return 1;
}
else
{
print("MYSQL: Could not reconnect to server, terminating server...");
SendRconCommand("exit");
return 0;
}
}
}