Problem strlen
#1

Hi, i made a command /me. It should give a error if you dont fill in the params.. But it doesnt give the error?
Code:

Код:
CMD:me(playerid, params[])
{
	if(!strlen(params))
	{
        SendClientMessage(playerid, COLOR_RED, "[ERROR] "green"Usage: /me [TEXT]");
        return 1;  //Stopt het commando
	}
	else
	{
		new pname[24];
   		new string[128];
   		GetPlayerName(playerid, pname, sizeof(pname));
    	format(string, sizeof(string), "[ME] "yellow"%s "green"%s "grey"(/Me [TEXT])", pname, params);
		SendClientMessageToAll(COLOR_RED, string);
	}
	return 1;
}
Thanks
Penait1
Reply


Messages In This Thread
Problem strlen [FIXED] - by Penait1 - 28.08.2011, 18:07
Re: Problem strlen - by [MG]Dimi - 28.08.2011, 19:35
Re: Problem strlen - by Kingunit - 28.08.2011, 19:41

Forum Jump:


Users browsing this thread: 1 Guest(s)