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: function heading differs from prototype (
/showthread.php?tid=563206)
function heading differs from prototype -
izeatfishz - 14.02.2015
err: function heading differs from prototype
code:
pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
{
if(IsPlayerNPC(damagedid) && bodypart == 9)
{
SetRNPCHealth(damagedid, 0.0);
GameTextForPlayer(playerid, "~h~~r~Headshot!", 4000, 4);
SetPVarInt(damagedid,"ZombieHeadshot",1);
}
if(IsPlayerNPC(damagedid))
{
if(GetPlayerWeapon(playerid) == 34 && GetPlayerWeapon(playerid) == 33)
{
SetRNPCHealth(damagedid, GetRNPCHealth(damagedid)-65);
}
}
if(IsPlayerNPC(damagedid))
{
if(GetRNPCHealth(damagedid) == 0)
{
pInfo[playerid][pKills]++;
GivePlayerMoneyEx(playerid,400);
SendDeathMessage(playerid, damagedid, weaponid);
}
}
return 1;
}
Re: function heading differs from prototype -
1fret - 14.02.2015
The number of arguments given at a previous declaration of the function does not match the number of arguments given at the current declaration.