Problem with Server Unkown Command....
#1

If More Than 1 player joins my server then instead of only coming this message Server Unkown Command Also Comes...

Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
	if(success == 0)
	{
		new string[1029];
		strcat(string, "Sorry! The Command You Typed Does Not Exits!!\n\n");
		strcat(string, "To see The Commands Type /Cmds\n\n");
 	    strcat(string, "For More Help Type /Help Or \n\n");
        strcat(string, "Tell Your Problem To Our Server Admins\n\n");
		strcat(string, "Click The OK Button\n");
        ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "RG-Info: Wrong Command......" , string," Ok ");
        SendClientMessage(playerid, red, "RG-Info: Wrong Command.. Type /cmds To See Commands");
	    return 0;
	}
	return 1;
}
Reply
#2

pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success)
    {
            new string[1029];
            strcat(string, "Sorry! The Command You Typed Does Not Exits!!\n");
            strcat(string, "To see The Commands Type /Cmds\n");
            strcat(string, "For More Help Type /Help Or \n");
                   strcat(string, "Tell Your Problem To Our Server Admins\n");
            strcat(string, "Click The OK Button\n");
                   ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "RG-Info: Wrong Command......" , string," Ok  ");
    }
    return 1;
}
Or see this http://pastebin.com/mYcgwG8F
Reply
#3

Hmmm......Still The Same....
Reply
#4

Код:
new string[1029];
"1029" cells ? for just a few lines of text, I'll suggest you to use 128 rather than using 1029.

I think pawn uses 32bits for each cell.

Conclusion:- 1029*32 = 32928 bits
Reply
#5

Thanks codectile for your suggestion..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)