Hook giving "function heading differs from prototype"
#1

I just downloaded and included Nex Anticheater. But it triggered two errors that i couldn't figure:

Код:
C:\PawnCC\include\nex-ac.inc(3061) : warning 202: number of arguments does not match definition
C:\PawnCC\include\nex-ac.inc(3075) : error 025: function heading differs from prototype
C:\PawnCC\include\nex-ac.inc(5678) : warning 202: number of arguments does not match definition
C:\PawnCC\include\nex-ac.inc(5692) : error 025: function heading differs from prototype
This error is usually caused by a missing parameter, but this is the code:

PHP код:
#if defined _inc_y_hooks || defined _INC_y_hooks
    
hook OnPlayerTakeDamage(playeridissueridFloat:amountweaponidbodypart)
#else
    
public OnPlayerTakeDamage(playeridissueridFloat:amountweaponidbodypart)
#endif
{
    if(
ACInfo[playerid][acKicked]) return 1;
    
ACInfo[playerid][acDeathRes] = true;
    
#if !defined _inc_y_hooks && !defined _INC_y_hooks && defined ac_OnPlayerTakeDamage
        
L3061 --> return ac_OnPlayerTakeDamage(playeridissueridamountweaponidbodypart);
    
#else
        
return 0;
    
#endif
}
//The Hook itself
#if !defined _inc_y_hooks && !defined _INC_y_hooks
    #if defined _ALS_OnPlayerTakeDamage
        #undef OnPlayerTakeDamage
    #else
        #define _ALS_OnPlayerTakeDamage
    #endif
    #define OnPlayerTakeDamage ac_OnPlayerTakeDamage
    #if defined ac_OnPlayerTakeDamage
        
L3075 --> forward ac_OnPlayerTakeDamage(playeridissueridFloat:amountweaponidbodypart);
    
#endif
#endif 
The other snippet is very similar.

Does anyone has any ideia of what is going on?
Reply


Messages In This Thread
Hook giving "function heading differs from prototype" - by Juniiro3 - 08.09.2017, 04:10
Re: Hook giving "function heading differs from prototype" - by 1fret - 08.09.2017, 06:40
Re: Hook giving "function heading differs from prototype" - by Juniiro3 - 08.09.2017, 14:19

Forum Jump:


Users browsing this thread: 1 Guest(s)