Loop crash
#1

I want to show all available ranks to player, but this crashes my server.

PHP код:
// command /ranks
    
new string[500];
    
string[0] = EOS;
    
    switch(
team)
    {
        case 
TEAM_MAFIA:
        {
            new 
i;
            
            for(
0sizeof(MafiaRank); i++)
            {
                new 
dmsg[32];
                
format(dmsgsizeof(dmsg), ""col_team_mafia"%s \t "col_white"Requered Level "col_team_mafia"[%d]\n"MafiaRank[i][rName], MafiaRank[i][rLevel]);
                
strcat(stringdmsg);
            }
            
            
ShowPlayerDialog(playeridDIALOG_RANK_MAFIADIALOG_STYLE_LIST"Choose your rank"string"Select""Cancel");        
        }
    } 
Defines and variables

PHP код:
#define col_team_mafia                                                  "{669999}"
#define col_white                                                      "{FFFFFF}"
enum RankInfo rLevelrSkinrName[32], rDescription[128] }
new 
MafiaRank[][RankInfo] = 
{
    { 
0126"Name 1""Description 1" },
    { 
2126"Name 2""Description 2" },
    { 
4126"Name 3""Description 3" },
    { 
6126"Name 4""Description 4" },
    { 
9126"Name 5""Description 5" },
    { 
12126"Name 6""Description 6" },
    { 
15126"Name 7""Description 7" },
    { 
18126"Name 8""Description 8" },
    { 
23126"Name 9""Description 9" },
    { 
28126"Name 10""Description 10" },
    { 
34126"Name 11""Description 11" },
    { 
0126"Name 12""Description 12" }
}; 
Reply
#2

Use crashdetect, to see, what causes the crash
Reply
#3

There is nothing in crashdetect (I configured it properly)
PS: That command cause the cras, I just don't know why?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)