Invalid Function or Declaration
#1

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/rules", cmdtext, true, 10) == 0)
	{
	  SendClientMessage(playerid,0xFFFF00AA,"Respect ALL Administrators.");
		SendClientMessage(playerid,0xFFFF00AA,"Respect ALL Administrators.");
		SendClientMessage(playerid,0xFFFF00AA,"Do not flame ANYONE.");
		SendClientMessage(playerid,0xFFFF00AA,"Do not hack, hacking of any sort will not be tolerated.");
		SendClientMessage(playerid,0xFFFF00AA,"Do not glitch or abuse bugs.");
		SendClientMessage(playerid,0xFFFF00AA,"Do not flame the scripts.");
    SendClientMessage(playerid,0xFFFF00AA,"Do not driver-drive-by.");
    SendClientMessage(playerid,0xFFFF00AA,"Do not kill people without a reason.");
 		return 1;

}
	return 0;
}
	if (strcmp("/help", cmdtext, true, 1) == 0)
	{
	  SendClientMessage(playerid,0xFFFF00AA,"Visit our Website:");
		SendClientMessage(playerid,0xFFFF00AA,"Visit our Ventrilo:");
		SendClientMessage(playerid,0xFFFF00AA,"Do /cophelp for cop commands.");
		SendClientMessage(playerid,0xFFFF00AA,"Do /drughelp for drug dealer commands.");
		SendClientMessage(playerid,0xFFFF00AA,"Do /gunhelp for gun dealer commands.");
		SendClientMessage(playerid,0xFFFF00AA,"Do /medhelp for medic commands.");
    SendClientMessage(playerid,0xFFFF00AA,"Do /civilhelp for civilian help.");
Код:
C:\Documents and Settings\Kimmie\Desktop\Cops N Robbers\gamemodes\CnR.pwn(146) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#2

Show line 146?
Reply
#3

Show us that line.
Reply
#4

Код:
	if (strcmp("/help", cmdtext, true, 1) == 0)
Reply
#5

Код:
}
L146	if (strcmp("/help", cmdtext, true, 1) == 0)
	{
	  SendClientMessage(playerid,0xFFFF00AA,"Respect ALL Administrators.");
		SendClientMessage(playerid,0xFFFF00AA,"Respect ALL Administrators.");
		SendClientMessage(playerid,0xFFFF00AA,"Do not flame ANYONE.");
		SendClientMessage(playerid,0xFFFF00AA,"Do not hack, hacking of any sort will not be tolerated.");
		SendClientMessage(playerid,0xFFFF00AA,"Do not glitch or abuse bugs.");
		SendClientMessage(playerid,0xFFFF00AA,"Do not flame the scripts.");
    SendClientMessage(playerid,0xFFFF00AA,"Do not driver-drive-by.");
    SendClientMessage(playerid,0xFFFF00AA,"Do not kill people without a reason.");
Reply
#6

Try:

pawn Код:
if(!strcmp("/help", cmdtext, true))
Reply
#7

Alright thanks. I'll try it.
Reply
#8

Still not working.
Reply
#9

Quote:
Originally Posted by Blokk
Still not working.
hmmm where can be the mistake..

EDIT: aha, remove the "return 0" between commands.
Reply
#10

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/rules", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid,0xFFFF00AA,"Respect ALL Administrators.");
        SendClientMessage(playerid,0xFFFF00AA,"Respect ALL Administrators.");
        SendClientMessage(playerid,0xFFFF00AA,"Do not flame ANYONE.");
        SendClientMessage(playerid,0xFFFF00AA,"Do not hack, hacking of any sort will not be tolerated.");
        SendClientMessage(playerid,0xFFFF00AA,"Do not glitch or abuse bugs.");
        SendClientMessage(playerid,0xFFFF00AA,"Do not flame the scripts.");
        SendClientMessage(playerid,0xFFFF00AA,"Do not driver-drive-by.");
        SendClientMessage(playerid,0xFFFF00AA,"Do not kill people without a reason.");
        return 1;
    }

    if (strcmp("/help", cmdtext, true, 1) == 0)
    {
        SendClientMessage(playerid,0xFFFF00AA,"Visit our Website:");
        SendClientMessage(playerid,0xFFFF00AA,"Visit our Ventrilo:");
        SendClientMessage(playerid,0xFFFF00AA,"Do /cophelp for cop commands.");
        SendClientMessage(playerid,0xFFFF00AA,"Do /drughelp for drug dealer commands.");
        SendClientMessage(playerid,0xFFFF00AA,"Do /gunhelp for gun dealer commands.");
        SendClientMessage(playerid,0xFFFF00AA,"Do /medhelp for medic commands.");
        SendClientMessage(playerid,0xFFFF00AA,"Do /civilhelp for civilian help.");
        return 1;      
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)