SA-MP Forums Archive
Error(3) - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Error(3) (/showthread.php?tid=265070)



Error(3) - razol - 29.06.2011

Hello, everyone.I have a some error.Please little help.Already thanks.

(1829) : error 010: invalid function or declaration
(1831) : error 010: invalid function or declaration
(1836) : error 010: invalid function or declaration



Код:
if(strcmp(cmd,"/animler",true)==0)
	{
        if(IsPlayerConnected(playerid))
	    {
        SendClientMessage(playerid,COLOR_RED," Animasyonlar:");
        SendClientMessage(playerid,COLOR_WHITE,"/fall - /aim - /elsalla - /crossarms - /yaslan - /sit - /handsup");
	}
		return 1;
	}



Re: Error(3) - Sasino97 - 29.06.2011

Quote:
Originally Posted by razol
Посмотреть сообщение
Hello, everyone.I have a some error.Please little help.Already thanks.

(1829) : error 010: invalid function or declaration
(1831) : error 010: invalid function or declaration
(1836) : error 010: invalid function or declaration



Код:
if(strcmp(cmd,"/animler",true)==0)
	{
        if(IsPlayerConnected(playerid))
	    {
        SendClientMessage(playerid,COLOR_RED," Animasyonlar:");
        SendClientMessage(playerid,COLOR_WHITE,"/fall - /aim - /elsalla - /crossarms - /yaslan - /sit - /handsup");
	}
		return 1;
	}
1 - Indent your code
2 - Are you sure the error is here?? I can't find any error here

pawn Код:
if(strcmp(cmd,"/animler",true)==0)
{
    if(IsPlayerConnected(playerid))
    {
        SendClientMessage(playerid, COLOR_RED, " Animasyonlar:");
        SendClientMessage(playerid, COLOR_WHITE, "/fall - /aim - /elsalla - /crossarms - /yaslan - /sit - /handsup");
    }
    return 1;
}
The number in the ()s in the compiler output is the line number.

(1829) : error 010: invalid function or declaration
(1831) : error 010: invalid function or declaration
(1836) : error 010: invalid function or declaration

The error lines are 1829, 1831 and 1836.

Post them here


Re: Error(3) - razol - 29.06.2011

Iґam sure, error is here.

1829:
if(strcmp(cmd,"/animler",true)==0)

1831:
if(IsPlayerConnected(playerid))

1836:
return 1;


AW: Error(3) - Blowfish - 29.06.2011

Make sure that piece of code is really between the opening and closing curly brackets of OnPlayerCommandText.