function heading differs from prototype
#1

Код:
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.
Reply
#2

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)