MySQL - Login causes server crash
#1

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 Код:
#define THREAD_LOGIN          1
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);
        }
    }
Reply
#2

The directory and file that overwrites it exist?
Reply
#3

yeah i upload all SQL Tables what to do re-upload?
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)