Quote:
Originally Posted by DanishHaq
Well I've not spotted any errors directly, try and debug the code and look on your console for where the script is stopping (on server_log.txt)
pawn Код:
CMD:richlist(playerid, params[]) { mysql_query("SELECT `username`, `money` FROM `data` WHERE `PlayerBanned`=0 ORDER BY `money` DESC LIMIT 10"); mysql_store_result(); printf("debug note 1"); new ID, output[800]; printf("debug note 2"); while(mysql_retrieve_row()) { ID ++; printf("debug note 3 ID %d", id); new username[24], moneyvariable[80]; printf("debug note 4 ID %d", id); mysql_fetch_field_row(username, "user"); mysql_fetch_field_row(moneyvariable, "money"); printf("debug note 5 ID %d", id); format(output, sizeof(output), "%s %d. %s with %d Dollars\n", output, ID, username, strval(moneyvariable)); printf("debug note 6 ID %d", id); } mysql_free_result(); printf("debug note 7"); ShowPlayerDialog(playerid, 25, DIALOG_STYLE_MSGBOX, "Top 10 Players", output, "OK", "Cancel"); printf("debug note 8"); return 1; }
|
From this part on wards it ain't working.
pawn Код:
mysql_fetch_field_row(moneyvariable, "money");
printf("debug note 5 ID %d", id);
format(output, sizeof(output), "%s %d. %s with %d Dollars\n", output, ID, username, strval(moneyvariable));
printf("debug note 6 ID %d", id);
}
mysql_free_result();
printf("debug note 7");
ShowPlayerDialog(playerid, 25, DIALOG_STYLE_MSGBOX, "Top 10 Players", output, "OK", "Cancel");
printf("debug note 8");