06.03.2015, 13:57
Hi, I've been making a top list system with MySQL 38.
Everything's going good so far, but I don't know why it doesn't show the dialog here.
The values are being stored in the destinations, but the dialog isn't showing up..
What could be the problem?
Everything's going good so far, but I don't know why it doesn't show the dialog here.
pawn Код:
CMD:topscore(playerid, params[])
{
mysql_tquery(MySQL, "SELECT `Username`, `Score` FROM `"Users_Table"` ORDER BY `Score` DESC LIMIT 10", "LoadTopScore", "i", playerid);
return 1;
}
function LoadTopScore(playerid)
{
new output[800], str[80], username[24], score;
for(new i = 0, rows = cache_get_row_count(); i < rows; i ++)
{
cache_get_field_content(i, "Username", username, MySQL, 24);
score = cache_get_field_content_int(i, "Score", MySQL);
format(str, sizeof str, "%i. %s - %i score\n", i, username, score);
strcat(output, str);
}
ShowPlayerDialog(playerid, 123123, DIALOG_STYLE_MSGBOX, "Top score list", output, "Close", "");
return 1;
}
What could be the problem?