Unknown MySQL Problem
#3

This is my Code in my script which saves and loads playerinfo.

pawn Код:
stock SavePInfo(playerid)
{
    if(GetPVarInt(playerid, "LoggedIN") == 1)
    {
        new Query[600];
       
        format(Query, sizeof(Query), "UPDATE `playerinfo` SET `kills` = %d, `deaths` = %d, `money` = %d, `Level` = %d, `Score` = %d, `VIP` = %d, `Ban` = %d, `Connect` = %d WHERE `user` = '%s'", // Also remember to update this...

        Account[playerid][pKills],
        Account[playerid][pDeaths],
        GetPlayerMoney(playerid),
        Account[playerid][pLevel],
        GetPlayerScore(playerid),
        Account[playerid][pVIP],
        Account[playerid][pBanned],
        Account[playerid][pConnect],
        pName(playerid));

        mysql_query(Query);
        mysql_free_result();
        AvoidOOSync();
        return 1;
    }
    else return 0;
}

stock LoadPlayerInfo(iPlayer)
{
    new Query[700];

    if(mysql_fetch_row(Query))
    {
        sscanf(Query, "p<|>e<s[24]s[35]dddddddd>",Account[iPlayer]);
        mysql_free_result();
    }
    return 1;
}
Do you want more of the debug?
Reply


Messages In This Thread
Unknown MySQL Problem - by Surferdude - 02.10.2011, 01:02
Re: Unknown MySQL Problem - by [HiC]TheKiller - 02.10.2011, 02:14
Re: Unknown MySQL Problem - by Surferdude - 02.10.2011, 04:31
Re: Unknown MySQL Problem - by Kar - 02.10.2011, 05:13
Re: Unknown MySQL Problem - by [HiC]TheKiller - 02.10.2011, 05:25
Re: Unknown MySQL Problem - by Surferdude - 02.10.2011, 05:42
Re: Unknown MySQL Problem - by iggy1 - 02.10.2011, 07:24
Re: Unknown MySQL Problem - by Surferdude - 05.10.2011, 10:44
Re: Unknown MySQL Problem - by Scenario - 05.10.2011, 11:32
Re: Unknown MySQL Problem - by Surferdude - 05.10.2011, 11:47

Forum Jump:


Users browsing this thread: 2 Guest(s)