command CMD: ranks dont work
#2

Please don't go all caps and please, start using the [PHP] or at least [CODE] tag for PAWN codes in the forums..
However, here's a fixed code:

PHP код:
CMD:ranks(playerid) {
    new 
string[156], dialogstr[sizeof(string) * sizeof(gRank)];
    
strcat(dialogstr"Rank\tRank name\tScore\n");
    for(new 
isizeof(gRank); i++) {
        if(
GetPlayerRank(playerid) >= i)
                
format(stringsizeof(string), ""SAMP_BLUE"%i.\t"SAMP_BLUE"%s\t"SAMP_BLUE"%i+ score\n"igRank[i][r_name], gRank[i][r_score]);
        else
            
format(stringsizeof(string), ""GREY"%i.\t"GREY"%s\t"GREY"%i+ score\n"igRank[i][r_name], gRank[i][r_score]);
    }
    
strcat(dialogstrstring);
    
ShowPlayerDialog(playeridDIALOG_COMMONDIALOG_STYLE_TABLIST_HEADERS"Ranks list"dialogstr"Close""");
    return 
1;

You should've received lots of errors over missing the closing bracket of the for() loop; at line 9.

Mhm-.
Reply


Messages In This Thread
command CMD: ranks dont work - by DeX24 - 15.09.2017, 17:19
Re: command CMD: ranks dont work - by Meller - 15.09.2017, 17:25
Re: command CMD: ranks dont work - by DeX24 - 15.09.2017, 17:27
Re: command CMD: ranks dont work - by DeX24 - 15.09.2017, 17:34
Re: command CMD: ranks dont work - by Meller - 15.09.2017, 17:46
Re: command CMD: ranks dont work - by DeX24 - 15.09.2017, 17:56
Re: command CMD: ranks dont work - by Meller - 15.09.2017, 17:59

Forum Jump:


Users browsing this thread: 1 Guest(s)