04.10.2015, 18:12
Here i'm trying to display top ten online players list but fails
This is what shows in the log
Why is that error, how could it be fixed?
pawn Код:
CMD:top10on(playerid, params[])
{
new full_info[500];
for(new row, rows = cache_get_row_count(mysql); row < rows; row ++)
{
new
username[MAX_PLAYER_NAME + 1],
pphour,
ppmins,
ID,
sub_info[50]
;
ID ++;
cache_get_field_content(row, "user", username, mysql);
pphour = cache_get_field_content_int(row, "phours", mysql);
ppmins = cache_get_field_content_int(row, "pminutes", mysql);
format(sub_info, sizeof(sub_info), "%s"ccwhite"%d. %s with "ccgreen"%d "ccwhite"hours, "ccgreen"%d "ccwhite"minutes\n", row + 1, ID, username, pphour, ppmins);
strcat(full_info, sub_info);
}
ShowPlayerDialog(playerid, 1101, DIALOG_STYLE_MSGBOX, "Top 10 Online", full_info, "OK", "Cancel");
return 1;
}
Quote:
[22:08:13] [DEBUG] cache_get_row_count - connection: 1 [22:08:13] [WARNING] cache_get_row_count - no active cache |