Raised This Month: $ Target: $400
 0% 

[SOLVED] Tag mismatch in enum


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 06-03-2014 , 09:22   [SOLVED] Tag mismatch in enum
Reply With Quote #1

Hum, iam getting a warning of tag mismatch in the client print:

PHP Code:
#include <amxmodx>
#include <amxmisc>

static const Fdc_Names[][] = {
    
"Kills",
    
"Deaths",
    
"HeadShot Kills",
    
"HeadShot Deaths"
}


enum WeaponData 
{
    
Data_Kills,
    
Data_Deaths,
    
Data_Kills_Hs,
    
Data_Deaths_Hs


new 
g_WeaponData[CSW_P90 1][WeaponData

public 
plugin_init()
{
    
register_concmd("fdc_kills""AdminCommand_FDC"ADMIN_CVAR"<weaponname> <0/1>")
    
register_concmd("fdc_deaths""AdminCommand_FDC"ADMIN_CVAR"<weaponname> <0/1>")
    
register_concmd("fdc_hs_kills""AdminCommand_FDC"ADMIN_CVAR"<weaponname> <0/1>")
    
register_concmd("fdc_hs_deaths""AdminCommand_FDC"ADMIN_CVAR"<weaponname> <0/1>")
}

public 
AdminCommand_FDC(idlvlcid)
{
    if(
cmd_access(idlvlcid3))
    {
        new 
Command[14]
        
read_argv(0Commandcharsmax(Command))
        new 
WeaponDataDataType
            
        
switch(Command[7])
        {
            case 
'l'DataType Data_Kills
            
            
case 't'DataType Data_Deaths
            
            
case 'k'DataType Data_Kills_Hs
            
            
case 'd'DataType Data_Deaths_Hs
            
            
default :
            {
                
client_print(idprint_console"Usage: fdc_kills/fdc_deaths/fdc_hs_kills/fdc_hs_deaths <weaponname> <amount>")
                return 
PLUGIN_HANDLED
            
}
        }
        
        new 
Amount[10], szWeapon[20] = "weapon_"
        
read_argv(1szWeapon[7], charsmax(szWeapon)-7)
        
read_argv(2Amountcharsmax(Amount))
        
        new 
iId get_weaponid(szWeapon)
        
        if(
iId)
        {
            
g_WeaponData[iId][DataType] = str_to_num(Amount)
            
// Tag mismatch
            
client_print(idprint_console"You have changed %s's %s to %d!"szWeapon[7], Fdc_Names[DataType], Amount)
        }
        
        else
            
client_print(idprint_console"Sorry, %s is not a valid weapon!"szWeapon[7])
    }
    return 
PLUGIN_HANDLED

__________________
Jhob94 is online now
 



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 09:36.


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