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

Quote:
Originally Posted by Misiur
Посмотреть сообщение
Your vType is probably inside enum declaring strong tag (starting with big letter). Like:

pawn Код:
enum VehicleInfo {
    vType
    //(...)
}
So, do one of the following:
pawn Код:
if(eVehicleType:vStats[vehicleID][vType] == VEHICLE_TYPE_FACTION)
//or
if(vStats[vehicleID][vType] == VehicleInfo:VEHICLE_TYPE_FACTION)
//or
if(_:vStats[vehicleID][vType] == _:VEHICLE_TYPE_FACTION)
#e: and the reason why switch isn't causing tag mismatches, is because everything in there is reduced to numeric constants (_ tag), while if checks everything
Nope, it starts with a lowercase e.

pawn Код:
enum enumVehicleData
{
    vID,
    vType,
    vOwnerID,
    vModel,
    vSecurityLevel,
    vMod0,
    vMod1,
    vMod2,
    vMod3,
    vMod4,
    vMod5,
    vMod6,
    vMod7,
    vMod8,
    vMod9,
    vMod10,
    vMod11,
    vMod12,
    Float:vPosX,
    Float:vPosY,
    Float:vPosZ,
    Float:vAngle,
    vKeys,
    vFuel,
    vPaintjob,
    vMileage,
   
    vScriptID,
    bool:vLights,
    bool:vEngine,
    bool:vAlarm,
    bool:vLock,
    bool:vBonnet,
    bool:vBoot,
    Float:vSpeedM,
    Float:vSpeedTh,
    Float:vMaxSpeedTh,
    bool:vBroken
};
@Bakr: Is it really?

#e: Is it bad if I don't name my enums? Because, removing the "name" or the "tag" of the enum seems to remove the tag mismatch warning...
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: 2 Guest(s)