Incomplete list
#1

I have tops function by SqLite but put the first 100 list I only go up by 85 on average and will increase more than the rest arrays do not appear, did I get the limit?

An example:

PHP код:
new string[128], DBResult:qresult, rows;
    
format(string, sizeof(string), "SELECT `Nick`,`Ks`,`Sex`,`Onf` FROM `USERS` ORDER BY (`Ks` * 1) DESC limit 100");
    
qresult = db_query(ZLDB, string);
    
rows = db_num_rows(qresult);
    if(
rows)
    {
    new 
final_string[32 * sizeof(string)], MInfoNick[MAX_PLAYER_NAME], MInfoKill, MOnOff;
    
strcat(final_string, "#\tNickname\tKilling\tState\n");
    for(new 
i = 0; i < rows; i ++)
    {
    
db_get_field_assoc(qresult, "Nick", MInfoNick, sizeof(MInfoNick));
    
MInfoKill = db_get_field_assoc_int(qresult, "Ks");
    
MOnOff = db_get_field_assoc_int(qresult, "Onf");
    new 
MsnTD[25];
    if(
MOnOff == 1) MsnTD = "Connected"; else MsnTD = "Disconnected";
    
format(string, sizeof(string), ""COL_ROJO"%d°\t%s\t%d\t%s\n", (i + 1), MInfoNick, MInfoKill, MsnTD);
    
strcat(final_string, string);
    
db_next_row(qresult);
    }
    
ShowPlayerDialog(playerid,DIALOG_TOPS, DIALOG_STYLE_TABLIST_HEADERS, "-§- Top score (killing) -§-", final_string, "Accept", "Back");
    
PlayerPlaySound(playerid, 1139, 0.0, 0.0, 0.0); 
Example: Increase string [128] to string [256] or string [32 * sizeof (string)] to final_string [40 * sizeof (string)] but still leaves the incomplete list does not increase no more, did I get the most or something I do wrong?
Reply
#2

Try adding another string. Had this problem to once and I added two or three more strings.
Reply
#3

How to add another string?
Reply


Forum Jump:


Users browsing this thread: