SA-MP Forums Archive
mysql loading fail. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: mysql loading fail. (/showthread.php?tid=235462)



mysql loading fail. - MahmutBey - 05.03.2011

hello guys, I have this code. but I don't know sscanf and I want to other type.

pawn Код:
stock LoadPlayerInfo(iPlayer)
{
    new
        Query[700];

    if(mysql_fetch_row(Query))
    {
        sscanf(Query, "e<p<|>s[24]s[35]ddddfffd>", PVar[iPlayer]);
        mysql_free_result();
    }
    return 1;
}
pawn Код:
enum _PSTATS
{
    pLayaName[24],
    pPassword[35],
    pKills,
    pDeaths,
    pMoney,
    pLevel,
    Float:pLastX,
    Float:pLastY,
    Float:pLastZ,
    pInt // Add more info
}
new PVar[MAX_PLAYERS][_PSTATS];

but I want:

pawn Код:
stock LoadPlayerInfo(iPlayer)
{
    new
        Query[700];

    if(mysql_fetch_row(Query))
    {
        //example
        pKills[iPlayer] = xxx[1] ?

        mysql_free_result();
    }
    return 1;
}
so I want to read one,one not all.


Re: mysql loading fail. - MahmutBey - 05.03.2011

it is current


Re: mysql loading fail. - MahmutBey - 06.03.2011

help me....