error 025: function heading differs from prototype - 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)
+--- Thread:  error 025: function heading differs from prototype (
/showthread.php?tid=456554)
 
error 025: function heading differs from prototype - 
darkdave -  06.08.2013
(5220) : error 025: function heading differs from prototype
Код:
public SetPlayerCriminal(playerid,declare,reason [])
{//example: SetPlayerCriminal(playerid,255, "Stealing A Police Vehicle");
	if(IsPlayerConnected(playerid))
	{
	    PlayerInfo[playerid][pCrimes] += 1;
	    new points = WantedPoints[playerid];
		new turned[MAX_PLAYER_NAME];
		new turner[MAX_PLAYER_NAME];
		new turnmes[128];
		new wantedmes[128];
		new wlevel;
		strmid(PlayerCrime[playerid][pAccusedof], reason, 0, strlen(reason), 255);
		GetPlayerName(playerid, turned, sizeof(turned));
		if (declare == 255)
		{
			format(turner, sizeof(turner), "Unknown");
			strmid(PlayerCrime[playerid][pVictim], turner, 0, strlen(turner), 255);
		}
		if (declare == 256)
 What is wrong gives me this error? Please help me !
Re: error 025: function heading differs from prototype - 
CutX -  06.08.2013
your 3th argument is a string (reason), so isntead of
do
(also in ur forward)
should look like
Код:
forward SetPlayerCriminal(playerid,declare,const reason []);
public SetPlayerCriminal(playerid,declare,const reason [])
 
Re: error 025: function heading differs from prototype - 
dEcooR -  06.08.2013
First tell me the line