SA-MP Forums Archive
Problem with Server Unkown Command.... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem with Server Unkown Command.... (/showthread.php?tid=525902)



Problem with Server Unkown Command.... - TheRaGeLord - 14.07.2014

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;
}



Re: Problem with Server Unkown Command.... - FahadKing07 - 14.07.2014

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


Re: Problem with Server Unkown Command.... - TheRaGeLord - 14.07.2014

Hmmm......Still The Same....


Re: Problem with Server Unkown Command.... - codectile - 14.07.2014

Код:
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


Re: Problem with Server Unkown Command.... - TheRaGeLord - 14.07.2014

Thanks codectile for your suggestion..