View Single Post
Author Message
rikka0w0
Member
Join Date: May 2018
Location: Sydney, Australia / Beijing, China
Old 10-10-2018 , 11:21   Why 'warning 213: tag mismatch enum?'
Reply With Quote #1

I have the following code:
HTML Code:
enum L4DW_WeaponSlot {
	L4DW_WeaponSlot_None = -1,
    L4DW_WeaponSlot_Primary = 0,
    L4DW_WeaponSlot_Secondary = 1,
    L4DW_WeaponSlot_Throwable = 2,
    L4DW_WeaponSlot_HeavyHealthItem = 3,
    L4DW_WeaponSlot_LightHealthItem = 4
};

enum L4DW_WeaponId {
    WEPID_NONE,             // 0
    WEPID_PISTOL,           // 1
    WEPID_SMG,              // 2
.....................
}

L4DW_WeaponSlot WeaponSlots[L4DW_WeaponId] = {
    L4DW_WeaponSlot_None,				// WEPID_NONE       waring starts here
    L4DW_WeaponSlot_Secondary,			// WEPID_PISTOL
.......................
};

It is supposed to make a constant list of enums, I don't know why the compiler generate the warning message 'warning 213: tag mismatch enum?' ? I get warning on every line in L4DW_WeaponSlot WeaponSlots[L4DW_WeaponId]. How can I get rid of this warning?

Any ideas? Thanks!
__________________

Last edited by rikka0w0; 10-10-2018 at 11:23.
rikka0w0 is offline