AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Missmatch error (https://forums.alliedmods.net/showthread.php?t=183587)

DoviuX 04-23-2012 14:18

Missmatch error
 
I get mismatch error from second line. What could be the problem ?

PHP Code:

            pevvictimpev_origincharsmaxu_globalvarfOrigin ] ) );
            
FVecIVeccharsmaxu_globalvarfOrigin ] ), iOrigin ); 


Napoleon_be 04-23-2012 14:54

Re: Missmatch error
 
show the error and your arrays... Full code would be helpfull.

DoviuX 04-23-2012 14:59

Re: Missmatch error
 
PHP Code:

enum _:originsa {
    
iOrigin,
    
Float:fOrigin
}

new 
u_originvar][ originsa ];

public 
deathmsg( ) {
        new 
victim read_data);

        
pevvictimpev_originu_originvarfOrigin ] );
        
FVecIVecsizeofu_originvarfOrigin ] ), u_originvariOrigin ] );
        new 
u_originvar][ iOrigin ];
        new 
u_originvar][ iOrigin ];
        new 
u_originvar][ iOrigin ];
        
create_smokexy);
        
create_smoke50y);
        
create_smokex50);
        
beam_removevictim );
        if( 
u_playerdatavictim ][ g_hooked ] ) drag_end(victim);



rak 04-23-2012 14:59

Re: Missmatch error
 
PHP Code:

enum _:originsa 
    
iOrigin
    
Float:fOrigin 


new 
u_originvaroriginsa ][3]; 

public 
deathmsg( ) { 
        new 
victim read_data); 

        
pevvictimpev_originu_originvarfOrigin ] ); 
        
FVecIVecu_originvarfOrigin ], u_originvariOrigin ] ); 
        new 
u_originvariOrigin ][ ]; 
        new 
u_originvariOrigin ][ ]; 
        new 
u_originvariOrigin ][ ]; 
        
create_smokexy); 
        
create_smoke50y); 
        
create_smokex50); 
        
beam_removevictim ); 
        if( 
u_playerdatavictim ][ g_hooked ] ) drag_end(victim); 



hleV 04-23-2012 16:03

Re: Missmatch error
 
You're trying to convert an integer (charsmax() and sizeof return integers) into a vector.

DoviuX 04-24-2012 08:57

Re: Missmatch error
 
It compiles but I get tag missmatch in this line:
PHP Code:

FVecIVecu_originvarfOrigin ], u_originvariOrigin ] ); 


rak 04-24-2012 19:32

Re: Missmatch error
 
try this

PHP Code:

FVecIVecFloat:u_originvarfOrigin ], u_originvariOrigin ] ); 

EDIT:

PHP Code:

enum _:originsa 
    
iOrigin[3], 
    
Float:fOrigin[3]


new 
u_originvaroriginsa ]; 

public 
deathmsg( ) { 
        new 
victim read_data); 

        
pevvictimpev_originu_originvarfOrigin ] ); 
        
FVecIVecu_originvarfOrigin ], u_originvariOrigin ] ); 
        new 
u_originvariOrigin ][ ]; 
        new 
u_originvariOrigin ][ ]; 
        new 
u_originvariOrigin ][ ]; 
        
create_smokexy); 
        
create_smoke50y); 
        
create_smokex50); 
        
beam_removevictim ); 
        if( 
u_playerdatavictim ][ g_hooked ] ) drag_end(victim); 



.ThePro 04-24-2012 20:29

Re: Missmatch error
 
Friend, the error "Missmatch" happens when the function of this line does not match what was recorded.

For example:

I used the setting times of Furien Mod this:

Code:

if (furien_get_user_team (id) == AntiFurien)
It was recorded in this way include:

Code:

enum {_ItemRestriction
 Furien,
 AntiFurien
 }

 forward furien_team_change (id);
 forward furien_round_restart (id);
 native furien_get_user_team (id);

And this caused "Misstach tag", because the command AntiFurien not "worked" with the native.
So to solve it was enough to make a simple modification to include:

Code:

native _ItemRestriction: furien_get_user_team (id);
Now Command Furien AntiFurien or already working with this function.

What I mean is that when the error happens TagMisstach, a command is invalid in this function / line.


All times are GMT -4. The time now is 07:44.

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