Undefined Symbol "cmd"
#8

Quote:
Originally Posted by (*|Flake|*)
Посмотреть сообщение
should be
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/command here", cmdtext, true, 10) == 0)
    {
The length parameter is obsolete for this! Do NOT use it! Your command WILL cut off if it's longer and even otherwise its pointless for command comparision.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/command here", true))
    {
This way you don't have to worry about the length and you cannot experience issues either. Remember that the "true" means it ignores upper-lower casing aka CommAnD is the same as command. Set it to false if you don't want that.

Regards.
Reply


Messages In This Thread
Undefined Symbol "cmd" - by DragonYancy - 11.06.2012, 05:58
Re: Undefined Symbol "cmd" - by Flake. - 11.06.2012, 06:00
Re: Undefined Symbol "cmd" - by Cxnnor - 11.06.2012, 06:01
Re: Undefined Symbol "cmd" - by Randy More - 11.06.2012, 06:05
Re: Undefined Symbol "cmd" - by DragonYancy - 11.06.2012, 06:13
Re: Undefined Symbol "cmd" - by Randy More - 11.06.2012, 06:15
Re: Undefined Symbol "cmd" - by JhnzRep - 11.06.2012, 06:17
AW: Re: Undefined Symbol "cmd" - by Extremo - 11.06.2012, 06:17
Re: Undefined Symbol "cmd" - by Cxnnor - 11.06.2012, 06:20
Re: Undefined Symbol "cmd" - by DragonYancy - 11.06.2012, 06:30

Forum Jump:


Users browsing this thread: 2 Guest(s)