A tag mismatch warning that I don't understand...
#1

Okay, this makes absolutely no sense to me. I keep getting a tag mismatch on this line:

pawn Код:
if(vStats[vehicleID][vType] == VEHICLE_TYPE_FACTION)
"VEHICLE_TYPE_FACTION" is defined in an enum and " vType" is in a different enum but it doesn't have a specific tag or anything.

pawn Код:
enum eVehicleType
{
    VEHICLE_TYPE_ZERO_FILL, // bug prevention
    VEHICLE_TYPE_PERSONAL,
    VEHICLE_TYPE_FACTION,
    VEHICLE_TYPE_PUBLIC,
    VEHICLE_TYPE_BUSINESS,
};
However, if I use a switch, the warning goes away:

pawn Код:
switch(vStats[vehicleID][vType])
    {
        case VEHICLE_TYPE_FACTION:
        {
            //
        }
    }
It has nothing to do with the code above, because this has happened to me before with a different enum. I don't understand why it's doing this though. Isn't "VEHICLE_TYPE_FACTION" just being replaced with a number corresponding to the location in the enum?

Why would the switch work, but not the if statement?
Reply


Messages In This Thread
[SOLVED] A tag mismatch warning that I don't understand... - by Scenario - 07.08.2013, 20:26
Re: A tag mismatch warning that I don't understand... - by Misiur - 07.08.2013, 20:33
Re: A tag mismatch warning that I don't understand... - by Bakr - 07.08.2013, 20:44
Re: A tag mismatch warning that I don't understand... - by Scenario - 07.08.2013, 22:50
Re: A tag mismatch warning that I don't understand... - by Vince - 07.08.2013, 23:26
Re: A tag mismatch warning that I don't understand... - by Scenario - 07.08.2013, 23:37

Forum Jump:


Users browsing this thread: 1 Guest(s)