Raised This Month: $ Target: $400
 0% 

Can't get rid of a tag mismatch


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
danielkza
AMX Mod X Plugin Approver
Join Date: May 2007
Location: São Paulo - Brasil
Old 08-07-2008 , 18:20   Can't get rid of a tag mismatch
Reply With Quote #1

This is my code
PHP Code:
stock GetArgColor(arg_num,{Float,_}:color[3],tag tagof(color))
{
    new 
arg[32]
    
read_argv(arg_num,arg,charsmax(arg))
    
    if(!
strlen(arg))
        return 
false
        
    
new sizeof(AMX_SUPER_COLORS_NAME)
    while(
i-- > && !equali(AMX_SUPER_COLORS_NAME[i],arg,charsmax(arg))) {}
    
    if(
>= 0)
    {
        if(
tag == tagof(float))
        {
            
color[0] = float(AMX_SUPER_COLORS_VALUE[i][0])
            
color[1] = float(AMX_SUPER_COLORS_VALUE[i][1])
            
color[2] = float(AMX_SUPER_COLORS_VALUE[i][2])
        }
        else
        {
            
// I tried to do a direct copy here,but I got a tag mismatch even when overriding both tags.
            
color AMX_SUPER_COLORS_VALUE[i]
        }
        
        return 
true
    
}
    else if(!
is_str_num(arg))
        return 
false
        
    
new temp_color[3]
    
temp_color[0] = str_to_num(arg)
    
    if(!
read_argv(++arg_num,arg,charsmax(arg)) || !is_str_num(arg))
        return 
false
    temp_color
[1] = str_to_num(arg)
    
    if(!
read_argv(++arg_num,arg,charsmax(arg)) || !is_str_num(arg))
        return 
false
    temp_color
[2] = str_to_num(arg)
    
    if(
tag == tagof(float))
        
IVecFVec(temp_color,color)
    else
        
temp_color _:color
        
    
return true

I get a tag mismatch error on line
PHP Code:
color AMX_SUPER_COLORS_VALUE[i
I tried overring the tag in left value,in right value,or in both,and I still get a tag mismatch error. Any idea why?
danielkza is offline
 



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 05:34.


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