Server kicks me out, when I log in.
#1

Hi!

I've got a problem with my OnPlayerLogin.
I replaced the mysql_get_row with mysqlfetchacctsingle, because the mysql_get_row didn't work on my host and now, when I log in, it just kicks me out, saying "Server closed the connection."

Here's the pawn code:
pawn Code:
public OnPlayerLogin(playerid,password[]) // by Luk0r v1.0
{
    MySQLCheckConnection();
    printf("Check 1");
    new tmp2[256];
    new string2[64];
    new str[128];
    new
    string[256]
    ;
    new playername2[MAX_PLAYER_NAME];
    new playernamesplit[3][MAX_PLAYER_NAME];
    GetRPName(playerid, playername2, sizeof(playername2));
    split(playername2, playernamesplit, '_');
    MySQLFetchAcctSingle(KasutajaInfo[playerid][pSQLID], "Password", KasutajaInfo[playerid][pKey]);
    printf("Check 2");
    if(!strcmp(KasutajaInfo[playerid][pKey],password, true ) )
    {
        new Query[1024];
        new Field[64];
        new result[256];
        printf("Check 3");
        format(Query, sizeof(Query), "SELECT * FROM `players` WHERE `id` = '%d'", KasutajaInfo[playerid][pSQLID] );
        mysql_query(Query);
        mysql_store_result();
        printf("Check 4");
        if(mysql_fetch_row_format(Query,"|"))
        {
            printf("Check 5");
            MySQLFetchAcctSingle(KasutajaInfo[playerid][pSQLID], "PlayerLevel", KasutajaInfo[playerid][pLevel]);
                    // A couple of more lines, about a hundred. :D
Reply


Messages In This Thread
Server kicks me out, when I log in. - by tsonn1 - 14.11.2012, 13:09
Re: Server kicks me out, when I log in. - by jotan. - 14.11.2012, 13:30
Re: Server kicks me out, when I log in. - by tsonn1 - 14.11.2012, 16:11
Re: Server kicks me out, when I log in. - by tsonn1 - 15.11.2012, 12:32
Re: Server kicks me out, when I log in. - by KiNG3 - 15.11.2012, 13:36
Re: Server kicks me out, when I log in. - by ReneG - 15.11.2012, 13:39
Re: Server kicks me out, when I log in. - by Sinner - 15.11.2012, 13:42

Forum Jump:


Users browsing this thread: 2 Guest(s)