SA-MP Forums Archive
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=636311)



function heading differs from prototype - UnholyBeast - 24.06.2017

Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
	/*if(IsAdminOnDuty[playerid])
	{
		SetPlayerHealth(playerid, 100);
	}*/
	return 1;
}
I added this to my gamemode, and regardless of what's inside of it. I get this error.

Код:
error 025: function heading differs from prototype
I copied this from a_samp.inc so this makes literally no sense to me.


Re: function heading differs from prototype - Threshold - 24.06.2017

Do you have the latest version of SA-MP includes? The 'bodypart' parameter in OnPlayerTakeDamage was added in 0.3z, so this is likely what is causing your error.

Get the latest server files by clicking HERE.


Re: function heading differs from prototype - UnholyBeast - 24.06.2017

I added the files you linked me to, and I'm still getting the error.

EDIT: It works just fine when I remove the bodypart parameter, so I have no idea.
EDIT 2: I fixed it. I'm just dumb and forgot to update the files to the compiler Sublime Text 3 is using.