09.12.2014, 00:34
(
Последний раз редактировалось Galletziz; 09.12.2014 в 01:46.
)
Hey i have a problem with the plugin of MYSQL/R39, i have some querys in my script that not execute whitout logs, and i can't comunicate with the database. I have read the MySQL Plugin log and it only execute functions on OnGameModeInit, but if i desconnect from the server, function save_player_stats() (function that i have created for save player stats in database ) don't run.. or better, run but the queryes don't run. Yesterday all was right and now i can't comunicate with my database why? з_з
For example, look this, this script, must pass the email that user type in dialog at database table. But mysql_query would appear not working, becouse when i check in mysql plugin log this is result:
very strange o:
pawn Код:
new MD5_pwrd[200],pname[MAX_PLAYER_NAME],query[128],IP[16];
mysql_escape_string(inputtext,MD5_pwrd);
GetPlayerName(playerid,pname,sizeof(pname));
GetPlayerIp(playerid,IP,sizeof(IP));
mysql_format(db_connect,query,sizeof(query),"INSERT INTO samp_tabella_utenti (ID,IP,username,password) VALUES ('','%s','%s',MD5('%s'))",IP,pname,MD5_pwrd);
new Cache:results = mysql_query(db_connect,query);
if(mysql_errno(db_connect) != 1){
new infomail[188];
format(infomail,sizeof(infomail),"{FFFFFF}If you want, you can records your {00FF00}email{FFFFFF} in our databases so you can recive all {FF0000}news{FFFFFF} from our server.");
SendClientMessage(playerid,-1,"{FF0000}//{FFFFFF}system: Greatings, you has been successfully registered into our databases.");
cache_delete(results);
ShowPlayerDialog(playerid,d_mail,DIALOG_STYLE_INPUT,"Register your email",infomail,"Done","Skip");
}else{
cache_delete(results);
SendClientMessage(playerid,-1,"{FF0000}//{FFFFFF}system: Fatal Error.");
Kick(playerid);
}
very strange o: