mysql problem
#3

Quote:
Originally Posted by Loot
Посмотреть сообщение
Debug the code to a few pieces, to help you find out which number didn't get called. (take a look in the server console)
pawn Код:
COMMAND:top(playerid, params[])
{
    new
        Query[160],
        count = 10,
        result[2][32],
        stringt[(24 + 10) * 10];

    print("1");

    mysql_format(gSQL, Query, "SELECT `Score`, `PlayerName` FROM `"#MYSQL_TABLE"` ORDER BY `Score` ASC LIMIT 10");
    mysql_function_query(gSQL, Query, true, "LoadPlayer", "d", playerid);
   
    print("2");

    if (mysql_num_rows() < 1) return 0;

    print("3");
    while (mysql_retrieve_row() && count > 0)
    {
        mysql_fetch_field_row(result[0], "Score");
        mysql_fetch_field_row(result[1], "PlayerName");

        print("4");

        format(stringt, sizeof(stringt), "%s%d. %s: %d\n", stringt, count--, result[1],strval(result[0]));
    }
    ShowPlayerDialog(playerid, 1223, DIALOG_STYLE_MSGBOX, "Top 10", stringt, "Close", "");
    print("5");
    return 1;
}
Hope someone know how to fix this.


Код:
[17:38:10] [join] test has joined the server (0:127.0.0.1)
[17:38:24] 1
[17:38:26] 2
[17:38:26] 1
[17:38:26] 2
[17:38:28] [part] test has left the server (0:1)
Is that mean there are warnings from 1 and 2? coz I tried to use /top 2 times.
Reply


Messages In This Thread
mysql problem - by kbalor - 12.11.2013, 12:29
Re: mysql problem - by Loot - 12.11.2013, 12:36
Re: mysql problem - by kbalor - 12.11.2013, 12:38
Re: mysql problem - by Loot - 12.11.2013, 13:11
Re: mysql problem - by kbalor - 12.11.2013, 13:31
Re: mysql problem - by Loot - 12.11.2013, 13:39
Re: mysql problem - by kbalor - 12.11.2013, 13:47
Re: mysql problem - by Loot - 12.11.2013, 13:55
Re: mysql problem - by -Prodigy- - 12.11.2013, 14:22
Re: mysql problem - by kbalor - 12.11.2013, 14:25

Forum Jump:


Users browsing this thread: 1 Guest(s)