13.12.2014, 09:28
Код:
[11:13:59] Can't connect to MySQL Database | Trying Again ! [11:14:00] Can't connect to MySQL Database | Server Closed ! ..... > MySQL plugin unloaded.
[11:13:59] Can't connect to MySQL Database | Trying Again ! [11:14:00] Can't connect to MySQL Database | Server Closed ! ..... > MySQL plugin unloaded.
#define SQL_HOST "127.0.0.1" #define SQL_USER "root" #define SQL_PASS "" #define SQL_DATA "dayzdb"
new db_connect;
//OnGameModeInit()..
db_connect = mysql_connect("localhost","root","dayzdb","");
C:\Users\Andrijana\Desktop\HDRP\gamemodes\dayzstandalone.pwn(2011) : error 010: invalid function or declaration C:\Users\Andrijana\Desktop\HDRP\gamemodes\dayzstandalone.pwn(3484) : error 017: undefined symbol "SQL_HOST" C:\Users\Andrijana\Desktop\HDRP\gamemodes\dayzstandalone.pwn(3492) : error 017: undefined symbol "SQL_HOST" C:\Users\Andrijana\Desktop\HDRP\gamemodes\dayzstandalone.pwn(3896) : warning 203: symbol is never used: "db_connect"
3492: mysql_connect(SQL_HOST, SQL_USER, SQL_DATA, SQL_PASS);
3484: mysql_connect(SQL_HOST, SQL_USER, SQL_DATA, SQL_PASS);
203: }
2011: db_connect = mysql_connect("localhost","root","dayzdb","");
stock Connect_To_Database(){
mysql_connect(SQL_HOST, SQL_USER, SQL_DATA, SQL_PASS);
if(mysql_ping() == 1){
print("[DayZ - MySQL] Connect to MySQL Database successfully !");
return true;
}
else
{
print("[DayZ - MySQL] Can't connect to MySQL Database | Trying Again !");
mysql_connect(SQL_HOST, SQL_USER, SQL_DATA, SQL_PASS);
if(mysql_ping() == 1){
print("[DayZ - MySQL] Connect to MySQL Database successfully !");
return true;
}
else{
print("[DayZ - MySQL] Can't connect to MySQL Database | Server Closed !");
SendRconCommand("exit");
return true;
}
}
}