SA-MP Forums Archive
error 025: function heading differs from prototype! NEED HELP. - 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! NEED HELP. (/showthread.php?tid=409727)



error 025: function heading differs from prototype! NEED HELP. - LuckyPlaya` - 22.01.2013

Here is the problem. Whwn i compile it error comes up. Please give me some tip or solution. Thank you

Код:
error 025: function heading differs from prototype
HERE IS THE CODEerror row comes up at the public thing...)

Код:
public OnEnterExitModShop(playerid, vehicleid, componentid)
{
    SendClientMessage(playerid,0xFFFFFF96,"Vehicle component bought for 100$.");
	GivePlayerMoney(playerid,-100);
	SaveMods();

	if(VehiclesMod[vehicleid][0] == 0)
	{
	    VehiclesMod[vehicleid][0] = componentid;
	}
	else if(VehiclesMod[vehicleid][1] == 0)
	{
	    VehiclesMod[vehicleid][1] = componentid;
	}
	else if(VehiclesMod[vehicleid][2] == 0)
	{
	    VehiclesMod[vehicleid][2] = componentid;
	}
	else if(VehiclesMod[vehicleid][3] == 0)
	{
	    VehiclesMod[vehicleid][3] = componentid;
	}
	else if(VehiclesMod[vehicleid][4] == 0)
	{
	    VehiclesMod[vehicleid][4] = componentid;
	}
	else if(VehiclesMod[vehicleid][5] == 0)
	{
	    VehiclesMod[vehicleid][5] = componentid;
	}
	else if(VehiclesMod[vehicleid][6] == 0)
	{
	    VehiclesMod[vehicleid][6] = componentid;
	}
	else if(VehiclesMod[vehicleid][7] == 0)
	{
	    VehiclesMod[vehicleid][7] = componentid;
	}
	else if(VehiclesMod[vehicleid][8] == 0)
	{
	    VehiclesMod[vehicleid][8] = componentid;
	}
	else if(VehiclesMod[vehicleid][9] == 0)
	{
	    VehiclesMod[vehicleid][9] = componentid;
	}
	else if(VehiclesMod[vehicleid][10] == 0)
	{
	    VehiclesMod[vehicleid][10] = componentid;
    }
    else if(VehiclesMod[vehicleid][11] == 0)
	{
	    VehiclesMod[vehicleid][11] = componentid;
    }
    else if(VehiclesMod[vehicleid][12] == 0)
	{
	    VehiclesMod[vehicleid][12] = componentid;
    }
	else
	{
		SendClientMessage(playerid,0xFFFFFF96,"Your vehicle mods are full.");
	}
    return 1;
}



Re: error 025: function heading differs from prototype! NEED HELP. - FUNExtreme - 22.01.2013

OnEnterExitModShop is an existing samp callback, I think you have created your own with the same name? Because the parameters do not match at all.

https://sampwiki.blast.hk/wiki/OnEnterExitModShop


Re: error 025: function heading differs from prototype! NEED HELP. - Sasino97 - 22.01.2013

the callback should be like this:
pawn Код:
public OnEnterExitModShop(playerid,enterexit,interiorid)
But then you will get error because it doesn't know what are vehicleid and componentid.