Raised This Month: $186 Target: $400
 46% 

error 181: function argument named 'type' differs from prototype


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NC.svtrade
Member
Join Date: Nov 2015
Location: Korea
Old 05-15-2018 , 00:34   error 181: function argument named 'type' differs from prototype
Reply With Quote #1

PHP Code:
C:\Programming\SorucePawn\Compile\include\tfcsfunc/tfcs_cooldown.inc(15) : error 181: function argument named 'ctype' differs from prototype 
this is the code...

PHP Code:
forward Action TFCS_CoolOnAction(clientCoolType ctypeCoolFlag cflagFloat:distFloat:beforeFloat:after
and this is the type of variable

PHP Code:
enum CoolType {
    
CT_Primary 1,
    
CT_Secondary 2,
    
CT_Melee 3,
    
CT_Special,
    
CT_Special2,
    
CT_SpecialFire,
    
CT_ETC
};

enum CoolFlag (<<= 1) {
    
CF_End = ( << ),
    
CF_Start,
    
CF_Change
}; 
and this is forward calling function on core plugin

PHP Code:
stock Action:CallOnCoolTimeActionFwd(clientCoolType typeCoolFlag flagFloat:distFloat:befFloat:aft) {
    new 
Action:result;
    
    
Call_StartForward(g_hFwdCoolTimeAction);
    
Call_PushCell(client);
    
Call_PushCellRef(type);
    
Call_PushCellRef(flag);
    
Call_PushFloat(dist);
    
Call_PushFloat(bef);
    
Call_PushFloat(aft);
    
Call_Finish(result);
    
    return 
result;

I want to make a forward for having compatibility to enumerations...

How can I fix this?
__________________
Programming sourcemod, C++, etc;
NC.svtrade is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 05-15-2018 , 01:28   Re: error 181: function argument named 'type' differs from prototype
Reply With Quote #2

Declare the enum before it's used in the forward declaration.
Fyren is offline
NC.svtrade
Member
Join Date: Nov 2015
Location: Korea
Old 05-15-2018 , 12:39   Re: error 181: function argument named 'type' differs from prototype
Reply With Quote #3

Quote:
Originally Posted by Fyren View Post
Declare the enum before it's used in the forward declaration.
i'm so dumb man.. kill me....

thanks man
__________________
Programming sourcemod, C++, etc;
NC.svtrade is offline
Reply


Thread Tools
Display Modes

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 17:12.


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