07.08.2013, 20:26
(
Последний раз редактировалось Scenario; 07.08.2013 в 23:38.
)
Okay, this makes absolutely no sense to me. I keep getting a tag mismatch on this line:
"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.
However, if I use a switch, the warning goes away:
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?
pawn Код:
if(vStats[vehicleID][vType] == VEHICLE_TYPE_FACTION)
pawn Код:
enum eVehicleType
{
VEHICLE_TYPE_ZERO_FILL, // bug prevention
VEHICLE_TYPE_PERSONAL,
VEHICLE_TYPE_FACTION,
VEHICLE_TYPE_PUBLIC,
VEHICLE_TYPE_BUSINESS,
};
pawn Код:
switch(vStats[vehicleID][vType])
{
case VEHICLE_TYPE_FACTION:
{
//
}
}
Why would the switch work, but not the if statement?