Tag Mismatch Warnings
#1

Hey hey,

Got the warning "warning 213: tag mismatch" and I can't solve it. Here is the code:

PHP код:
COMMAND:robinfix(playeridparams[])
{
    if(
gTeam[playerid] == TEAM_ROBIN)
    {
        for(new 
1GetVehiclePoolSize(); <= ji++)
        {
            if(!
VehicleOccupied(RobinCar[i])) // warning 213: tag mismatch
            
{
                
SetVehicleToRespawn(RobinCar[i]); // warning 213: tag mismatch
            
}
        }
    }
    else if(
gTeam[playerid] != TEAM_ROBIN)
    {
        
SendClientMessage(playeridTEAM_ROBIN_COLOR"This Command is owned by Daan!");
    }
    return 
1;

Any idea's or help?
Reply
#2

Try this:

Код:
COMMAND:robinfix(playerid, params[])
{
    if(gTeam[playerid] == TEAM_ROBIN)
    {
        for(new i = 1, j = GetVehiclePoolSize(); i <= j; i++)
        {
            if(!VehicleOccupied(RobinCar(i)))
            {
                SetVehicleToRespawn(RobinCar(i));
            }
        }
    }
    else if(gTeam[playerid] != TEAM_ROBIN)
    {
        SendClientMessage(playerid, TEAM_ROBIN_COLOR, "This Command is owned by Daan!");
    }
    return 1;
}
Reply
#3

Line 10089: error 012: invalid function call, not a valid address
Line 10089: warning 215: expression has no effect
Line 10089: error 001: expected token: ";", but found ")"
Line 10089: error 029: invalid expression, assumed zero
Line 10089: fatal error 107: too many error messages on one line
Reply
#4

RobinCar is not of tag _: (default, integer) while those functions expect this tag. Hence, tag mismatch. If you are absolutely certain that RobinCar is in fact an integer you may remove its tag by prepending the tag override above.
Reply
#5

Show me how you create the RobinCar variable.
Reply
#6

for(new i = 0; j = GetVehiclePoolSize(); i <= j; i++)

Test it , i just try
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)