error 025: function heading differs from prototype
#1

(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 !
Reply
#2

your 3th argument is a string (reason), so isntead of
Код:
reason []
do
Код:
const reason []
(also in ur forward)

should look like
Код:
forward SetPlayerCriminal(playerid,declare,const reason []);
public SetPlayerCriminal(playerid,declare,const reason [])
Reply
#3

First tell me the line
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)