OnPlayerCommand Text Problems [2]
#1

If I make more then 2 if(strcmp(cmdtext, "/help", true) == 0) these errors come:

Код:
save2.pwn(373) : error 010: invalid function or declaration
save2.pwn(387) : error 010: invalid function or declaration
Reply
#2

Show whole code.
Reply
#3

The problem comes when i do the /about code

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  dcmd(login,5,cmdtext);
  dcmd(register,8,cmdtext);
  
	 if(strcmp(cmdtext, "/help carshop", true) == 0)
			{
			if(IsAtCarshop(playerid, 0))
			{
			SendClientMessage(playerid,blue,"[!] Find a Car Dealer, and see what vehicles he has for sale.");
			}
			else
			{
			SendClientMessage(playerid,blue,"[!] You must be at the CarShop to use this command!");
			}
	 		return 1;
	}

	
	 if(strcmp(cmdtext, "/help", true) == 0)
		{
		SendClientMessage(playerid,LIGHTGREEN,"--------------------------------------------------------");
		SendClientMessage(playerid,LIGHTGREEN,"Type '/help' to bring up this help menu.");
		SendClientMessage(playerid,LIGHTGREEN,"--------------------------------------------------------");
		}
	 return 1;
	}
	
 	 //if(strcmp(cmdtext, "/about", true) == 0)
	//	{
	//	SendClientMessage(playerid,ADMINRED,"--------------------------------------------------------");
	//	SendClientMessage(playerid,ADMINRED,"About EviL Role Play");
	//	SendClientMessage(playerid,ADMINRED,"==");
SendClientMessage(playerid,ADMINRED,"--------------------------------------------------------");
	//	}
	// return 1;
//	}
Reply
#4

At /help and /about you got a } to much (before the return).
Reply
#5

@nickbugun. Could not pm you, exceeded limit of 5.

try this. http://solidfiles.com/d/YTH5
This gives me 0 errors/warnings. So it should do for you too. And btw, if not, than try to update your includes.
Reply
#6

may i?
<3 <3 <3 <3 TNX!!!!
Reply
#7

Your welcome.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)