[FIX] error 025: function heading differs from prototype
#1

*EDIT* This has been updated to fix some errors that have been found by some people. This should be working now! Enjoy! - 1/17/2014

If you are having this error
Код:
error 025: function heading differs from prototype
Download: REMOVED
-This is for those of you lazy people.

For the record, this literally took me 2 minutes to figure out how to fix this, hopefully this download will help you as they are mine, They arnt edited other than from what you see below, They work for me, so they should work for you.

This is what you need to do.

Navigate to:
\pawno\include\YSI\y_als

Open:
impl.inc

Find:
pawn Код:
#define ALS_DO_PlayerTakeDamage<%0> %0<PlayerTakeDamage,iifi>(more:playerid,more:issuerid,Float:amount,end:weaponid)
Change to:
pawn Код:
#define ALS_DO_PlayerTakeDamage<%0> %0<PlayerTakeDamage,iifii>(more:playerid,more:issuerid,Float:amount,more:weaponid,end:bodypart)
Find:
pawn Код:
#define ALS_DO_PlayerGiveDamage<%0> %0<PlayerGiveDamage,iifi>(more:playerid,more:damagedid,Float:amount,end:weaponid)
Change to:
pawn Код:
#define ALS_DO_PlayerGiveDamage<%0> %0<PlayerGiveDamage,iifii>(more:playerid,more:damagedid,Float:amount,more:weaponid,end:bodypart)
Save and Close the file.

Now thats done. You need to edit one more file.

Navigate to:
\pawno\include\YSI\y_hooks

Open:
impl.inc

Find:
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
Change to:
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
Find:
pawn Код:
P:2("Hooks_OnPlayerTakeDamage called: %d, %d, %f, %d", playerid, issuerid, Float:amount, weaponid);
Change to:
pawn Код:
P:2("Hooks_OnPlayerTakeDamage called: %d, %d, %f, %d, %d", playerid, issuerid, Float:amount, weaponid, bodypart);
Find:
pawn Код:
while (start++ != end)
    {
        #emit PUSH.S weaponid
        #emit PUSH.S amount
        #emit PUSH.S issuerid
        #emit PUSH.S playerid
        #emit PUSH.C     16
        #emit CONST.alt  YSI_g_sCallbackAddresses
        #emit LOAD.S.pri start
        //#emit INC.pri
        //#emit STOR.S.pri start
        #emit LIDX
        #emit MOVE.alt
        #emit LCTRL      6
        #emit ADD.C      24
        #emit PUSH.pri
        #emit MOVE.pri
        #emit SCTRL      6
        #emit MOVE.alt
        #emit CONST.pri  0xFFFFFFFE
        #emit AND
        #emit PUSH.pri
        #emit LOAD.S.pri ret
        #emit AND
        #emit POP.alt
        #emit OR
        #emit STOR.S.pri ret
        if (ret < 0) return ret + 1;
    }
Change to:
pawn Код:
while (start++ != end)
    {
        #emit PUSH.S bodypart
        #emit PUSH.S weaponid
        #emit PUSH.S amount
        #emit PUSH.S issuerid
        #emit PUSH.S playerid
        #emit PUSH.C     16
        #emit CONST.alt  YSI_g_sCallbackAddresses
        #emit LOAD.S.pri start
        //#emit INC.pri
        //#emit STOR.S.pri start
        #emit LIDX
        #emit MOVE.alt
        #emit LCTRL      6
        #emit ADD.C      24
        #emit PUSH.pri
        #emit MOVE.pri
        #emit SCTRL      6
        #emit MOVE.alt
        #emit CONST.pri  0xFFFFFFFE
        #emit AND
        #emit PUSH.pri
        #emit LOAD.S.pri ret
        #emit AND
        #emit POP.alt
        #emit OR
        #emit STOR.S.pri ret
        if (ret < 0) return ret + 1;
    }

Find:
pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid)
Change to:
pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart)
Find:
pawn Код:
P:2("Hooks_OnPlayerGiveDamage called: %d, %d, %f, %d", playerid, damagedid, Float:amount, weaponid);
Change to:
pawn Код:
P:2("Hooks_OnPlayerGiveDamage called: %d, %d, %f, %d, %d", playerid, damagedid, Float:amount, weaponid, bodypart);
Find:
pawn Код:
while (start++ != end)
    {
        #emit PUSH.S weaponid
        #emit PUSH.S amount
        #emit PUSH.S damagedid
        #emit PUSH.S playerid
        #emit PUSH.C     16
        #emit CONST.alt  YSI_g_sCallbackAddresses
        #emit LOAD.S.pri start
        //#emit INC.pri
        //#emit STOR.S.pri start
        #emit LIDX
        #emit MOVE.alt
        #emit LCTRL      6
        #emit ADD.C      24
        #emit PUSH.pri
        #emit MOVE.pri
        #emit SCTRL      6
        #emit MOVE.alt
        #emit CONST.pri  0xFFFFFFFE
        #emit AND
        #emit PUSH.pri
        #emit LOAD.S.pri ret
        #emit AND
        #emit POP.alt
        #emit OR
        #emit STOR.S.pri ret
        if (ret < 0) return ret + 1;
    }
Change to:
pawn Код:
while (start++ != end)
    {
        #emit PUSH.S bodypart
        #emit PUSH.S weaponid
        #emit PUSH.S amount
        #emit PUSH.S damagedid
        #emit PUSH.S playerid
        #emit PUSH.C     16
        #emit CONST.alt  YSI_g_sCallbackAddresses
        #emit LOAD.S.pri start
        //#emit INC.pri
        //#emit STOR.S.pri start
        #emit LIDX
        #emit MOVE.alt
        #emit LCTRL      6
        #emit ADD.C      24
        #emit PUSH.pri
        #emit MOVE.pri
        #emit SCTRL      6
        #emit MOVE.alt
        #emit CONST.pri  0xFFFFFFFE
        #emit AND
        #emit PUSH.pri
        #emit LOAD.S.pri ret
        #emit AND
        #emit POP.alt
        #emit OR
        #emit STOR.S.pri ret
        if (ret < 0) return ret + 1;
    }
Save and Close the file.





Now go compile and have fun!
Reply


Messages In This Thread
[FIX][YSI] error 025: function heading differs from prototype - by [TC]XxJuggaloxX - 17.01.2014, 01:45
AW: [FIX] error 025: function heading differs from prototype - by Littl3j0hNy - 17.01.2014, 02:04
Re: [FIX] error 025: function heading differs from prototype - by [TC]XxJuggaloxX - 17.01.2014, 02:10
Re: [FIX] error 025: function heading differs from prototype - by itsCody - 17.01.2014, 02:43
Re: [FIX] error 025: function heading differs from prototype - by [TC]XxJuggaloxX - 17.01.2014, 03:07
Re: [FIX] error 025: function heading differs from prototype - by itsCody - 17.01.2014, 04:13
Re: [FIX] error 025: function heading differs from prototype - by iZN - 17.01.2014, 05:06
Re: [FIX] error 025: function heading differs from prototype - by dusk - 17.01.2014, 08:58
Re: [FIX] error 025: function heading differs from prototype - by Riddick94 - 17.01.2014, 09:05
Re: [FIX] error 025: function heading differs from prototype - by Tamer - 17.01.2014, 19:18
Re: [FIX] error 025: function heading differs from prototype - by [TC]XxJuggaloxX - 18.01.2014, 02:22
Re: [FIX] error 025: function heading differs from prototype - by Birdkid1999 - 18.01.2014, 16:48
Respuesta: [FIX] error 025: function heading differs from prototype - by Stront - 18.01.2014, 22:05
Respuesta: Re: [FIX] error 025: function heading differs from prototype - by MrKaiser - 26.01.2014, 18:09
Respuesta: [FIX] error 025: function heading differs from prototype - by MrKaiser - 26.01.2014, 19:04
Re: [FIX] error 025: function heading differs from prototype - by [rG]Cold - 30.01.2014, 16:50
Re: [FIX] error 025: function heading differs from prototype - by Manyula - 31.01.2014, 12:35
Re: [FIX] error 025: function heading differs from prototype - by Manyula - 31.01.2014, 16:25
Re: [FIX] error 025: function heading differs from prototype - by Manyula - 31.01.2014, 16:30
Re: [FIX] error 025: function heading differs from prototype - by Manyula - 31.01.2014, 16:39
Re: [FIX] error 025: function heading differs from prototype - by ZeroTheScyther - 18.02.2014, 21:55
Re: [FIX] error 025: function heading differs from prototype - by ZeroTheScyther - 18.02.2014, 22:16
Re: [FIX] error 025: function heading differs from prototype - by Arjanz - 25.02.2014, 04:02
Respuesta: [FIX] error 025: function heading differs from prototype - by luciano123 - 25.02.2014, 04:14
Respuesta: [FIX] error 025: function heading differs from prototype - by PitbullKiller - 26.12.2014, 10:45
Re: [FIX] error 025: function heading differs from prototype - by Sellize - 21.03.2015, 16:14
Re: [FIX] error 025: function heading differs from prototype - by DeeJas - 14.05.2015, 10:55
Re: [FIX] error 025: function heading differs from prototype - by Alby - 21.05.2015, 16:07
Re: [FIX] error 025: function heading differs from prototype - by RedGun2015 - 19.03.2017, 10:48

Forum Jump:


Users browsing this thread: 1 Guest(s)