Hi, hab ein kleines Problem. Meine Top Duels werden mir irgendwie nicht ausgegeben, alle anderen Top Listen funktionieren.
Funktioniert und Daten werden korrekt ausgegeben:
case 1: {
new cQuery[1024];
format(cQuery, sizeof(cQuery), "SELECT Name, Kills, Color FROM `players` ORDER BY `Kills` DESC LIMIT 10");
mysql_query(MySQL, cQuery);
mysql_store_result();
new num, top[10][24], score[10][10], Top[1024], color[10][10];
while(mysql_retrieve_row())
{
mysql_fetch_field_row(top[num], "Name");
mysql_fetch_field_row(score[num], "Kills");
mysql_fetch_field_row(color[num], "Color");
num ++;
}
format(Top, sizeof(Top),"Top\tNickname\tKills\n1\t{%06x}%s\t%i\n2\t{%06x}%s\t%i\n3\t{%06x}%s\t%i\n4\t{%06x}%s\t%i\n5\t{%06x}%s\t%i\n6\t{%06x}%s\t%i\n7\t{%06x}%s\t%i\n8\t{%06x}%s\t%i\n9\t{%06x}%s\t%i\n10\t{%06x}%s\t%i",
strval(color[0]) >>> 8, top[0], strval(score[0]),
strval(color[1]) >>> 8, top[1], strval(score[1]),
strval(color[2]) >>> 8, top[2], strval(score[2]),
strval(color[3]) >>> 8, top[3], strval(score[3]),
strval(color[4]) >>> 8, top[4], strval(score[4]),
strval(color[5]) >>> 8, top[5], strval(score[5]),
strval(color[6]) >>> 8, top[6], strval(score[6]),
strval(color[7]) >>> 8, top[7], strval(score[7]),
strval(color[8]) >>> 8, top[8], strval(score[8]),
strval(color[9]) >>> 8, top[9], strval(score[9])
);
ShowPlayerDialog(playerid, D_Tops+2, DIALOG_STYLE_TABLIST_HEADERS, "Top Killers", Top, "Close", "Back");
mysql_free_result();
}
Funktioniert nicht, keine Daten werden ausgegeben:
case 5:
{
new cQuery[1024];
format(cQuery, sizeof(cQuery), "SELECT Name, WonDuels, Color FROM `players` ORDER BY `WonDuels` DESC LIMIT 10");
mysql_query(MySQL, cQuery);
mysql_store_result();
new num, top[10][24], score[10][10], Top[1024], color[10][10];
while(mysql_retrieve_row())
{
mysql_fetch_field_row(top[num], "Name");
mysql_fetch_field_row(score[num], "WonDuels");
mysql_fetch_field_row(color[num], "Color");
num ++;
}
format(Top, sizeof(Top),"Top\tNickname\tWon Duels\n1\t{%06x}%s\t%i\n2\t{%06x}%s\t%i\n3\t{%06x}%s\t%i\n4\t{%06x}%s\t%i\n5\t{%06x}%s\t%i\n6\t{%06x}%s\t%i\n7\t{%06x}%s\t%i\n8\t{%06x}%s\t%i\n9\t{%06x}%s\t%i\n10\t{%06x}%s\t%i",
strval(color[0]) >>> 8, top[0], strval(score[0]),
strval(color[1]) >>> 8, top[1], strval(score[1]),
strval(color[2]) >>> 8, top[2], strval(score[2]),
strval(color[3]) >>> 8, top[3], strval(score[3]),
strval(color[4]) >>> 8, top[4], strval(score[4]),
strval(color[5]) >>> 8, top[5], strval(score[5]),
strval(color[6]) >>> 8, top[6], strval(score[6]),
strval(color[7]) >>> 8, top[7], strval(score[7]),
strval(color[8]) >>> 8, top[8], strval(score[8]),
strval(color[9]) >>> 8, top[9], strval(score[9])
);
ShowPlayerDialog(playerid, D_Tops+6, DIALOG_STYLE_TABLIST_HEADERS, "Top Duels", Top, "Close", "Back");
mysql_free_result();
}
Wo habe ich ein Fehler gemacht ?