SQLITE
#1

hi,

pawn Код:
if(pInfo[playerid][USER_LOGGED_IN] == true)
    {
        format(Query, sizeof(Query), "UPDATE `users` SET Money = '%d', Score = '%d', EXP = '%d', Kills = '%d', Deaths = '%d', Wanted = '%d', JailTime = '%d', Job = '%d', Fstyle = '%d', PlaceHit = '%d', C4 = '%d', tie = '%d', BC = '%d', BP = '%d', Cutie = '%d', banCops = '%d', banArmy = '%d', Dia = '%02d', Mes = '%02d', Ano = '%d', IP = '%d' WHERE `Username` = '%s' COLLATE NOCASE",
                                                                                                        GetPlayerMonez(playerid),
                                                                                                        GetPlayerScore(playerid),
                                                                                                        pInfo[playerid][EXP],
                                                                                                        pInfo[playerid][Kills],
                                                                                                        pInfo[playerid][Deaths],
                                                                                                        pInfo[playerid][Wanted],
                                                                                                        pInfo[playerid][JailTime],
                                                                                                        pInfo[playerid][Job],
                                                                                                        pInfo[playerid][FStyle],
                                                                                                        pInfo[playerid][Placehit],
                                                                                                        pInfo[playerid][C4],
                                                                                                        pInfo[playerid][Tie],
                                                                                                        pInfo[playerid][BreakC],
                                                                                                        pInfo[playerid][BreakP],
                                                                                                        pInfo[playerid][Cutie],
                                                                                                        pInfo[playerid][BanCops],
                                                                                                        pInfo[playerid][BanArmy],
                                                                                                        day,
                                                                                                        month,
                                                                                                        year,
                                                                                                        plrIP,
                                                                                                        DB_Escape(GetPlayerName(playerid))); // Gather the name of the player then escape it.
    if(db_query(Database, Query))
    {
        format(qmsj, sizeof(qmsj), "SUCESSFULLY SAVE-STATS %s", GetPlayerName(playerid));
        print(qmsj);
    }
    else
    {
        format(qmsj, sizeof(qmsj), "ERROR IN SAVE-STATS %s", GetPlayerName(playerid));
        print(qmsj);
    }
}
Print Error IN SAVE STATS, They see a problem?... I apologize for years without knowing anything about script, and this is a code that is what I worked my memory
Reply
#2

Put this on server.cfg and then post the logs
db_logging 1
db_log_queries 1
Execute that statement and post the logs
Reply
#3

One thing i want to say in addition is that ip is not an integer its a string.Did u check the data type of fields ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)