Crashing while using this cmd
#1

While using this command, the whole server crashes, is there anything wrong with this code?

pawn Код:
CMD:richlist(playerid, params[])
{
    mysql_query("SELECT `username`, `money` FROM `data` WHERE `PlayerBanned`=0 ORDER BY `money` DESC LIMIT 10");
    mysql_store_result();

    new
        ID,
        output[800];

    while(mysql_retrieve_row())
    {
        ID ++;

        new
            username[24],
            moneyvariable[80];

        mysql_fetch_field_row(username, "user");
        mysql_fetch_field_row(moneyvariable, "money");

        format(output, sizeof(output), "%s %d. %s with %d Dollars\n", output, ID, username, strval(moneyvariable));
    }
    mysql_free_result();

    ShowPlayerDialog(playerid, 25, DIALOG_STYLE_MSGBOX, "Top 10 Players", output, "OK", "Cancel");
    return 1;
}
Reply


Messages In This Thread
Crashing while using this cmd - by Bondage - 28.10.2014, 20:46
Re: Crashing while using this cmd - by DanishHaq - 28.10.2014, 23:21
Re: Crashing while using this cmd - by nemesis- - 29.10.2014, 01:48
Re: Crashing while using this cmd - by Bondage - 29.10.2014, 12:26
Re: Crashing while using this cmd - by Diverse - 29.10.2014, 12:32
Re: Crashing while using this cmd - by Bondage - 29.10.2014, 14:22
Re: Crashing while using this cmd - by Bondage - 29.10.2014, 22:49
Re: Crashing while using this cmd - by Eth - 29.10.2014, 23:32

Forum Jump:


Users browsing this thread: 1 Guest(s)