error 025: function heading differs from prototype
#1

So, I was thinking to script a new damage system for my server using bodyparts, but when I change the OnPlayerTakeDamage and OnPlayerGiveDamage and add bodypart at the end, I get that error. Is there any way to fix it? Any help will be appreciated.
Reply
#2

Download the latest version of SA-MP and try again.
Reply
#3

Make sure your OnPlayerTakeDamage and OnPlayerGiveDamage looks like this:
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
If that didn't help, update your a_samp to the latest version and recompile your script.
Reply
#4

Quote:
Originally Posted by CalvinC
Посмотреть сообщение
Make sure your OnPlayerTakeDamage and OnPlayerGiveDamage looks like this:
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
If that didn't help, update your a_samp to the latest version and recompile your script.
I've done that already, I updated the pawno folder aswell but I still get that error.
Reply
#5

Are you using old includes that get inserted before your code and may use a hooking method to hook yours and you just don't see that the old include is made for an older version of sa-mp?
Reply
#6

Quote:
Originally Posted by Extremo
Посмотреть сообщение
Are you using old includes that get inserted before your code and may use a hooking method to hook yours and you just don't see that the old include is made for an older version of sa-mp?
Well, after spending some time of searching, I found that I had to update my YSI Include Pack. Now it works perfectly.
Reply
#7

That's the downside of discreetly hooking callbacks in the background but I am glad it worked for you
Reply
#8

I will give a reputation for those who tryed to help me, thanks a lot even if you didn't solve my problem.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)