Raised This Month: $32 Target: $400
 8% 

Solved error 025: function heading differs from prototype


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 03-03-2019 , 05:54   error 025: function heading differs from prototype
Reply With Quote #1

any fix please
i dont know what happen. the code is working fine and i have compiled the code but when i recompile it i got error

Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
Modified for www.freakz.ro

hero (2).sma(771) : error 025: function heading differs from prototype
hero (2).sma(779) : warning 217: loose indentation

1 Error.
Compile failed!

CODE:
PHP Code:
public pfn_touch(ptrptdattacker)
{
if (
pev_valid(ptr) && get_user_weapon(attacker) == CSW_AK47 && g_HasAk[attacker]) // check valid entity and user has gun
    
{    
        
// Get classnames
        
static classname[32]
        
pev(ptrpev_classnameclassname31)
         
//Get owner
            
new owner pev(ptrpev_owner)
            
// Alive...
            
new FM_NULLENT
            
//Damage
                
if( a!=owner&& a!=ptr&&pev(a,pev_takedamage)!=DAMAGE_NO && get_user_weapon(attacker) == CSW_AK47 && g_HasAk[attacker] ) 
                
ExecuteHamBHam_TakeDamage,owner ,ownerget_pcvar_floatcvar_damage_sentry ), DMG_BULLET )
                
set_pev(ptrpev_flagsFL_KILLME)
      }
      return 
PLUGIN_HANDLED


Last edited by SHIELD755; 03-03-2019 at 07:23.
SHIELD755 is offline
eat1k
Senior Member
Join Date: Apr 2018
Old 03-03-2019 , 06:38   Re: error 025: function heading differs from prototype
Reply With Quote #2

Where is the complete error?
__________________
eat1k is offline
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 03-03-2019 , 06:43   Re: error 025: function heading differs from prototype
Reply With Quote #3

Quote:
Originally Posted by eat1k View Post
Where is the complete error?
pasted error !!!
SHIELD755 is offline
eat1k
Senior Member
Join Date: Apr 2018
Old 03-03-2019 , 06:58   Re: error 025: function heading differs from prototype
Reply With Quote #4

public pfn_touch(ptr, ptd, attacker)

Now open engine.inc and search pfn_touch.
__________________
eat1k is offline
SHIELD755
Veteran Member
Join Date: Feb 2018
Location: FROM MARVEL STUDIO
Old 03-03-2019 , 07:21   Re: error 025: function heading differs from prototype
Reply With Quote #5

Quote:
Originally Posted by eat1k View Post
public pfn_touch(ptr, ptd, attacker)

Now open engine.inc and search pfn_touch.
FIXED the promble is the "(ptr, ptd, attacker)" just removed "attacker" and compiled it work
SHIELD755 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:41.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode