Raised This Month: $51 Target: $400
 12% 

Why 'warning 213: tag mismatch enum?'


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
rikka0w0
Member
Join Date: May 2018
Location: Sydney, Australia / Beij
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
 



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 03:51.


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