SA-MP Forums Archive
error 025: 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: error 025: function heading differs from prototype (/showthread.php?tid=564570)



error 025: function heading differs from prototype - dionisak0s - 22.02.2015

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.


Re: error 025: function heading differs from prototype - ATGOggy - 22.02.2015

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


Re: error 025: function heading differs from prototype - CalvinC - 22.02.2015

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.


Re: error 025: function heading differs from prototype - dionisak0s - 22.02.2015

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.


Re: error 025: function heading differs from prototype - Extremo - 22.02.2015

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?


Re: error 025: function heading differs from prototype - dionisak0s - 22.02.2015

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.


Re: error 025: function heading differs from prototype - Extremo - 22.02.2015

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


Re: error 025: function heading differs from prototype - dionisak0s - 22.02.2015

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