error 025: function heading differs from prototype! NEED HELP.
#1

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;
}
Reply
#2

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
Reply
#3

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)