MySQL - Login causes server crash - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: MySQL - Login causes server crash (
/showthread.php?tid=561253)
MySQL - Login causes server crash -
Barnwell - 02.02.2015
i starting my server and its work fine but when i register tell me login i login tell me Server is Restarting and again and crashed how to fixed it?
pawn Код:
stock LoginLog(string[])
{
LogCallback("LoginLog");
new entry[128];
format(entry, sizeof(entry), "%s\r\n",string);
new File:hFile;
hFile = fopen("LARP/Logs/logins.log", io_append);
fwrite(hFile, entry);
fclose(hFile);
LogCallback("LoginLog");
}
pawn Код:
if(dialogid == 1245)
{
if(response)
{
strmid(Typed[playerid], inputtext, 0, strlen(inputtext), 255);
if(!strcmp(Typed[playerid], "None", true))
{
ShowServerDialog(playerid, 1245, DIALOG_STYLE_PASSWORD,"Try Again, Please Log-In","You didn't type a password!\nType your password below to log-in","Log-in","Quit");
}
else
{
new
sqlQuery[300],
password2 = num_hash(inputtext)
;
actuallyConnected[playerid] = true;
format(sqlQuery, sizeof(sqlQuery), "SELECT * FROM samp_users WHERE `Username`='%s' AND `Password`='%d'", GPN(playerid), password2);
mysql_query(sqlQuery, THREAD_LOGIN, playerid);
return 1;
}
}
else
{
ServerKick(playerid);
}
}
Respuesta: MySQL - Login causes server crash -
Zume - 02.02.2015
The directory and file that overwrites it exist?
Re: MySQL - Login causes server crash -
Barnwell - 02.02.2015
yeah i upload all SQL Tables what to do re-upload?
Re: MySQL - Login causes server crash -
Ironboy - 02.02.2015
Quote:
Originally Posted by Barnwell
yeah i upload all SQL Tables what to do re-upload?
|
Not the SQL dump what he meant, make sure that you have LARP > Logs folders in your scriptfiles.