AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   error 181: function argument named 'type' differs from prototype (https://forums.alliedmods.net/showthread.php?t=307556)

NC.svtrade 05-15-2018 00:34

error 181: function argument named 'type' differs from prototype
 
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?

Fyren 05-15-2018 01:28

Re: error 181: function argument named 'type' differs from prototype
 
Declare the enum before it's used in the forward declaration.

NC.svtrade 05-15-2018 12:39

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

Originally Posted by Fyren (Post 2592228)
Declare the enum before it's used in the forward declaration.

i'm so dumb man.. kill me....

thanks man :)


All times are GMT -4. The time now is 20:09.

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