Crashing while using this cmd
#3

See if this helps any. You don't really need strval for moneyvariable:

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

    new ID = 0, output[800];

    while(mysql_retrieve_row())
    {
        ID++;
        new username[MAX_PLAYER_NAME], moneyvariable[80];

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

        format(output, sizeof(output), "%s %d. %s with %s dollars\n", output, ID, username, moneyvariable);
    }
    mysql_free_result();
    return ShowPlayerDialog(playerid, 25, DIALOG_STYLE_MSGBOX, "Top 10 Players", output, "OK", "");
}
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)