Crashing compiler :s
#1

This crashes the compiler, it doesn't give any response

pawn Код:
dcmd_rules(playerid,params[])
{
    #pragma unused params
    new string[800];
    format(string,sizeof(string),""lred"SERVER RULES",""lwhite"1."lorange"Any 3rd party programs that give you any advantages on others, are not allowed. \n"lwhite"2."lorange"No discussions about sexism and porn. \n"lwhite"3."lorange"Do not advertise any other servers, or sites \n"lwhite"4."lorange"No spamming. \n"lwhite"5."lorange"No spawn-killing. \n"lwhite"6."lorange"Do not annoy players. \n"lwhite"7."lorange"Do not abuse any bugs. \n"lwhite"8."lorange"No offensive/racist acts against other players "lwhite"9."lorange"No car park on another player");
    ShowPlayerDialog(playerid,9889,0,string,"ACCEPT","");
    return 1;
}
Reply
#2

It crashed my compiler, because that string is too long, yeah.....
Reply
#3

Код:
dcmd_rules(playerid,params[])
{
    #pragma unused params
    new RulesText[800];

    strcat(RulesText,""lred"SERVER RULES",""lwhite"\n");
    strcat(RulesText,"1."lorange"Any 3rd party programs that give you any advantages on others, are not allowed. \n");
    strcat(RulesText,""lwhite"2."lorange"No discussions about sexism and porn. \n");
    strcat(RulesText,""lwhite"3."lorange"Do not advertise any other servers, or sites \n");
    strcat(RulesText,""lwhite"4."lorange"No spamming. \n");
    strcat(RulesText,""lwhite"5."lorange"No spawn-killing. \n");
    strcat(RulesText,""lwhite"6."lorange"Do not annoy players. \n");
    strcat(RulesText,""lwhite"7."lorange"Do not abuse any bugs. \n");
    strcat(RulesText,""lwhite"8."lorange"No offensive/racist acts against other players \n");
    strcat(RulesText,""lwhite"9."lorange"No car park on another player");
    ShowPlayerDialog(playerid,9889,0,"***",RulesText,"ACCEPT","");
    return 1;
}
You forgot add also header to ShowPlayerDialog (replace "***")
I'm not sure it will show correctly, you will need to check that. Btw, it's 200% hard to add "lred" than {FF0000} to me o.0 When I edited this to do correctly, sometimes I didn't know what I do =)
For long dialogs, try using strcat
If the problem with crashing still happens, the problem is with "lred" and other...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)