View Single Post
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 10-10-2018 , 17:28   Re: Why 'warning 213: tag mismatch enum?'
Reply With Quote #2

When you use an enum value to index an array, it expects that value's tag to be the tag of the thing you're putting into the array. Here's an example:

PHP Code:
enum enumStructsAreBad {
    
float:aFloat,
    
anInt,
    
Handle:aHandle

If you try to assign to stupidStruct[aFloat] then it's going to want a float. In your code, you're giving it a L4DW_WeaponSlot where it wants an int.

You can view_as every assignment, tag every value in the enum, or make the first letter of L4DW_WeaponSlot lowercase so it's a weak tag.
Fyren is offline