SA-MP Forums Archive
MySQL top problem. - 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)
+--- Thread: MySQL top problem. (/showthread.php?tid=522710)



MySQL top problem. - tuuler - 28.06.2014

Hello, I found a working top10 system, but after some time when people are using /top10, then it just wont work anymore, database is up and everything.

Here's the code:
pawn Код:
mysql_query("SELECT `Username`, `Score` FROM `Users` ORDER BY `Score` DESC LIMIT 10");
        mysql_store_result();
        new szPrepTD[1200], iIterator = 1, iScore, szName[MAX_PLAYER_NAME], szUnload[64];
        while(mysql_fetch_row_format(szUnload)) {
        sscanf(szUnload, "p<|>s[24]d", szName, iScore);
        format(szPrepTD, sizeof(szPrepTD), "%s %d. %s - %d Score \n", szPrepTD, iIterator, szName, iScore);
        iIterator++;
        }
        mysql_free_result();
        ShowPlayerDialog(playerid, 8601, DIALOG_STYLE_MSGBOX, "TOP 10", szPrepTD, "Close", "");



Re: MySQL top problem. - BleverCastard - 28.06.2014

Edit: Read it wrong.


Re: MySQL top problem. - tuuler - 28.06.2014

Quote:
Originally Posted by BleverCastard
Посмотреть сообщение
Edit: Read it wrong.
Umm, okay?
Anyone else please?