MySQL "vip" is not loading! (logs)
#1

So I have this problem, everything else is working but the VIP wont load. This is the stock:

pawn Код:
stock Login(playerid)
{
    new query[128], string[64], money, score;
    format(query, sizeof(query), "SELECT * FROM accounts WHERE user = '%s'", Name(playerid));
   
    mysql_query(query);
    mysql_store_result();
    while(mysql_fetch_row_format(query))
    {
        mysql_fetch_field_row(string, "admin"); PlayerInfo[playerid][pAdmin] = strval(string);
        mysql_fetch_field_row(string, "vip"); PlayerInfo[playerid][pVIP] = strval(string);
        mysql_fetch_field_row(string, "warnings"); PlayerInfo[playerid][pWarnings] = strval(string);
        mysql_fetch_field_row(string, "score"); score = strval(string);
        mysql_fetch_field_row(string, "money"); money = strval(string);
        mysql_fetch_field_row(string, "kills"); PlayerInfo[playerid][pKills] = strval(string);
        mysql_fetch_field_row(string, "deaths"); PlayerInfo[playerid][pDeaths] = strval(string);
        mysql_fetch_field_row(string, "points"); PlayerInfo[playerid][pPoints] = strval(string);
    }
    mysql_free_result();
   
    GivePlayerMoney(playerid, money);
    SetPlayerScore(playerid, score);
    PlayerInfo[playerid][pLogged] = 1;
    UpdateStatsTextdraw(playerid);
    SendClientMessage(playerid, C_LGREEN, "ACCOUNT: Successfully logged in.");
    return 1;
}
A players' VIP level in the database is 3, but it wont load when he/she logs in.

This is the MySQL log:
pawn Код:
[11:42:52] CMySQLHandler::FetchRow() - Return: Username|c0516d978b6f895d0cf43d086f3d7245|0|3|0|48|29525|127.0.0.1|3|11|0

[11:42:52] >> mysql_fetch_field_row( Connection handle: 1 )

[11:42:52] CMySQLHandler::FetchField("admin") - 0

[11:42:52] >> mysql_fetch_field_row( Connection handle: 1 )

[11:42:52] CMySQLHandler::FetchField("vip") -

[11:42:52] >> mysql_fetch_field_row( Connection handle: 1 )

[11:42:52] CMySQLHandler::FetchField("warnings") - 0

[11:42:52] >> mysql_fetch_field_row( Connection handle: 1 )

[11:42:52] CMySQLHandler::FetchField("score") - 48

[11:42:52] >> mysql_fetch_field_row( Connection handle: 1 )

[11:42:52] CMySQLHandler::FetchField("money") - 29525

[11:42:52] >> mysql_fetch_field_row( Connection handle: 1 )

[11:42:52] CMySQLHandler::FetchField("kills") - 3

[11:42:52] >> mysql_fetch_field_row( Connection handle: 1 )

[11:42:52] CMySQLHandler::FetchField("deaths") - 11

[11:42:52] >> mysql_fetch_field_row( Connection handle: 1 )

[11:42:52] CMySQLHandler::FetchField("points") - 0

[11:42:52] >> mysql_fetch_row_format( Connection handle: 1 )
On this line you see, that the VIP level is 3 (the 2nd number)
pawn Код:
[11:42:52] CMySQLHandler::FetchRow() - Return: Username|c0516d978b6f895d0cf43d086f3d7245|0|3|0|48|29525|62.65.63.64|3|11|0
But it wont load the level 3 VIP, and in the mysql_log it says:
pawn Код:
[11:42:52] >> mysql_fetch_field_row( Connection handle: 1 )

[11:42:52] CMySQLHandler::FetchField("vip") -
Reply


Messages In This Thread
MySQL "vip" is not loading! (logs) - by Dan. - 02.08.2012, 08:39
Re: MySQL "vip" is not loading! (logs) - by Misiur - 02.08.2012, 08:55
Re: MySQL "vip" is not loading! (logs) - by Goobiiify - 02.08.2012, 08:59
Re: MySQL "vip" is not loading! (logs) - by Dan. - 02.08.2012, 09:15

Forum Jump:


Users browsing this thread: 1 Guest(s)