Warning 213: tag mismatch!
#1

Trying to get this script working; however for every instance within this gamemode this "tag mismatch" warning comes up. I will show 1 example.

PHP код:
CMD:lock(playeridparams[])
{
     new 
vw GetPlayerVirtualWorld(playerid);
        
    if(
PlayerInfo[playerid][HouseID] == 0) return SCM(playeridCOLOR_LIGHTRED"You do not own a house.");
    for(new 
1sizeof(HouseInfo); h++)
    {
        if(
IsPlayerInRangeOfPoint(playerid5.0HouseInfo[h][hEntranceX], HouseInfo[h][hEntranceY], HouseInfo[h][hEntranceZ] && vw == HouseInfo[h][hWorld])) return h;
        if(
IsPlayerInRangeOfPoint(playerid5.0HouseInfo[h][hEntranceX], HouseInfo[h][hEntranceY], HouseInfo[h][hEntranceZ]))
        {
            if(
== PlayerInfo[playerid][HouseID])
            {
                if(
vw == HouseInfo[h][hWorld])
                {
                    if(
HouseInfo[h][hOwned] == 1)
                    {
                        if(
HouseInfo[h][hLocked] == 1)
                        {
                            
HouseInfo[h][hLocked] = 0;
                            
GameTextForPlayer(playerid"~w~house ~g~ UNLOCKED"30006);
                            
PlayerPlaySound(playerid11450.00.00.0);
                            new 
file4[40];
                            
format(file4sizeof(file4), HPATHh);
                            new 
INI:File INI_Open(file4);
                            
INI_SetTag(File,"data");
                            
INI_WriteInt(File,"hLocked"HouseInfo[h][hLocked]);
                            
INI_Close(File);
                            break;
                        }
                        else
                        {
                            
HouseInfo[h][hLocked] = 1;
                            
GameTextForPlayer(playerid"~w~house ~r~ LOCKED"30006);
                            
PlayerPlaySound(playerid11450.00.00.0);
                            new 
file4[40];
                            
format(file4sizeof(file4), HPATHh);
                            new 
INI:File INI_Open(file4);
                            
INI_SetTag(File,"data");
                            
INI_WriteInt(File,"hLocked"HouseInfo[h][hLocked]);
                            
INI_Close(File);
                            break;
                        }
                    }
                }
            }
        }
        else
        {
            if(
IsPlayerInRangeOfPoint(playerid5.0HouseInfo[h][hExitX], HouseInfo[h][hExitY], HouseInfo[h][hExitZ] && vw == HouseInfo[h][hInsideWorld])) return h;
            if(
IsPlayerInRangeOfPoint(playerid5.0HouseInfo[h][hExitX], HouseInfo[h][hExitY], HouseInfo[h][hExitZ]))
            {
                if(
== PlayerInfo[playerid][HouseID])
                {
                    if(
vw == HouseInfo[h][hInsideWorld])
                    {
                        if(
HouseInfo[h][hOwned] == 1)
                        {
                            if(
HouseInfo[h][hLocked] == 1)
                            {
                                
HouseInfo[h][hLocked] = 0;
                                
GameTextForPlayer(playerid"~w~house ~g~ UNLOCKED"30006);
                                
PlayerPlaySound(playerid11450.00.00.0);
                                new 
file4[40];
                                
format(file4sizeof(file4), HPATHh);
                                new 
INI:File INI_Open(file4);
                                
INI_SetTag(File,"data");
                                
INI_WriteInt(File,"hLocked"HouseInfo[h][hLocked]);
                                
INI_Close(File);
                                break;
                            }
                            else
                            {
                                
HouseInfo[h][hLocked] = 1;
                                
GameTextForPlayer(playerid"~w~house ~r~ LOCKED"30006);
                                
PlayerPlaySound(playerid11450.00.00.0);
                                new 
file4[40];
                                
format(file4sizeof(file4), HPATHh);
                                new 
INI:File INI_Open(file4);
                                
INI_SetTag(File,"data");
                                
INI_WriteInt(File,"hLocked"HouseInfo[h][hLocked]);
                                
INI_Close(File);
                                break;
                            }
                        }
                    }
                }
            }
        }
    }
    return 
1;

The warning

Код:
(7059) : warning 213: tag mismatch
(7102) : warning 213: tag mismatch
Happens at each of these lines

7059
PHP код:
        if(IsPlayerInRangeOfPoint(playerid5.0HouseInfo[h][hEntranceX], HouseInfo[h][hEntranceY], HouseInfo[h][hEntranceZ] && vw == HouseInfo[h][hWorld])) return h
7102
PHP код:
            if(IsPlayerInRangeOfPoint(playerid5.0HouseInfo[h][hExitX], HouseInfo[h][hExitY], HouseInfo[h][hExitZ] && vw == HouseInfo[h][hInsideWorld])) return h
As always; whom ever helps will get +1 Rep.

Thanks in advance for your time.
Reply
#2

{
Else if
Reply
#3

Are these "HouseInfo[h][hExitX], HouseInfo[h][hExitY], HouseInfo[h][hExitZ]" floats?

pawn Код:
Float:hExitX,
Float:hExitY,
Float:hExitZ
Reply
#4

PHP код:
new HouseInfo[500][hInfo]; 
Is that what you wanted to know?
Reply
#5

No, post the enumerator "hInfo".
Reply
#6

I fixed the warnings I moved the ")"

fixed code is:
PHP код:
            if(IsPlayerInRangeOfPoint(playerid5.0HouseInfo[h][hExitX], HouseInfo[h][hExitY], HouseInfo[h][hExitZ]) && vw == HouseInfo[h][hInsideWorld]) return h
Now I have still the same "tag mismatch" warning on these three lines.

PHP код:
                    if(!strcmp(VehicleNumberPlate[id], PlayerInfo[playerid][pPlate1]) == 0
PHP код:
                    else if(!strcmp(VehicleNumberPlate[id], PlayerInfo[playerid][pPlate2]) == 0
PHP код:
                    else if(!strcmp(VehicleNumberPlate[id], PlayerInfo[playerid][pPlate3]) == 0
The whole code that these are in is:

PHP код:
    if(dialogid == DIALOG_VEHICLE)
    {
        if(
response)
        {
            switch(
listitem)
            {
                case 
0:
                {
                    new 
vehicleid GetPlayerVehicleID(playerid);
                    
GetVehicleParamsEx(vehicleidenginelightsalarmdoorsbonnetbootobjective);
                    if(
engine == && Fuel[vehicleid] <= 0)
                    {
                        
ShowErrorDialog(playerid"This vehicle is out of fuel.");
                        return 
1;
                    }
                    if(
engine == 1) { engine 0lights 0; }
                    else { 
engine 1lights 1; }
                    
SetVehicleParamsEx(vehicleidenginelightsalarmdoorsbonnetbootobjective);
                }
                case 
1:
                {
                    new 
vehicleid GetPlayerVehicleID(playerid);
                    
GetVehicleParamsEx(vehicleidenginelightsalarmdoorsbonnetbootobjective);
                    if(
lights == 1lights 0; else lights 1;
                    
SetVehicleParamsEx(vehicleidenginelightsalarmdoorsbonnetbootobjective);
                }
                case 
2:
                {
                    new 
vehicleid GetPlayerVehicleID(playerid);
                    
GetVehicleParamsEx(vehicleidenginelightsalarmdoorsbonnetbootobjective);
                    if(
bonnet == 1bonnet 0; else bonnet 1;
                    
SetVehicleParamsEx(vehicleidenginelightsalarmdoorsbonnetbootobjective);
                }
                case 
3:
                {
                    new 
vehicleid GetPlayerVehicleID(playerid);
                    
GetVehicleParamsEx(vehicleidenginelightsalarmdoorsbonnetbootobjective);
                    if(
boot == 1boot 0; else boot 1;
                    
SetVehicleParamsEx(vehicleidenginelightsalarmdoorsbonnetbootobjective);
                }
                case 
4:
                {
                    if(!
GetPVarInt(playerid"GasCan"))
                    {
                        
ShowErrorDialog(playerid"You don't have a gas can.");
                        return 
1;
                    }
                    new 
vehicleid GetPlayerVehicleID(playerid);
                    if(
Fuel[vehicleid] < 80.0Fuel[vehicleid] += 20.0;
                    else 
Fuel[vehicleid] = 100.0;
                    
SetPVarInt(playerid"GasCan"0);
                    
SendClientMessage(playeridCOLOR_WHITE"You have filled the fuel tank with 20% fuel.");
                }
                case 
5:
                {
                    new 
id GetPVarInt(playerid"DialogValue1");
                    if(
GetPlayerVehicleAccess(playeridid) < 2)
                    {
                        
ShowErrorDialog(playerid"You are not the owner of this vehicle.");
                        return 
1;
                    }
                    if(!
strcmp(VehicleNumberPlate[id], PlayerInfo[playerid][pPlate1]) == 0)
                    {
                        
PlayerInfo[playerid][pPlate1] = 0;
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File,"data");
                        
INI_WriteInt(File"Plate1"PlayerInfo[playerid][pPlate1]);
                        
INI_Close(File);
                    }
                    else if(!
strcmp(VehicleNumberPlate[id], PlayerInfo[playerid][pPlate2]) == 0)
                    {
                        
PlayerInfo[playerid][pPlate2] = 0;
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File,"data");
                        
INI_WriteInt(File"Plate2"PlayerInfo[playerid][pPlate2]);
                        
INI_Close(File);
                    }
                    else if(!
strcmp(VehicleNumberPlate[id], PlayerInfo[playerid][pPlate3]) == 0)
                     {
                        
PlayerInfo[playerid][pPlate3] = 0;
                        new 
INI:File INI_Open(UserPath(playerid));
                        
INI_SetTag(File,"data");
                        
INI_WriteInt(File"Plate3"PlayerInfo[playerid][pPlate3]);
                        
INI_Close(File);
                    }
                    new 
msg[128];
                    
VehicleCreated[id] = 0;
                    new 
money VehicleValue[id]/2;
                    
GivePlayerMoney(playeridmoney);
                    
format(msgsizeof(msg), "You have sold your vehicle for $%d."money);
                    
SendClientMessage(playeridCOLOR_WHITEmsg);
                    
RemovePlayerFromVehicle(playerid);
                    
DestroyVehicle(VehicleID[id]);
                    
SaveVehicle(id);
                }
                case 
6:
                {
                    new 
vehicleid GetPVarInt(playerid"DialogValue1");
                    if(
GetPlayerVehicleAccess(playeridvehicleid) < 2)
                    {
                        
ShowErrorDialog(playerid"You are not the owner of this vehicle.");
                        return 
1;
                    }
                    
GetVehiclePos(VehicleID[vehicleid], VehiclePos[vehicleid][0], VehiclePos[vehicleid][1], VehiclePos[vehicleid][2]);
                    
GetVehicleZAngle(VehicleID[vehicleid], VehiclePos[vehicleid][3]);
                    
VehicleInterior[vehicleid] = GetPlayerInterior(playerid);
                    
VehicleWorld[vehicleid] = GetPlayerVirtualWorld(playerid);
                    if(
GetPlayerMoney(playerid) < 199) return SCM(playeridCOLOR_LIGHTRED"You don't have enough money. ($700)");
                    
GivePlayerMoney(playerid, -200);
                    
SendClientMessage(playeridCOLOR_WHITE"You have bought this parking spot for your vehicle.");
                    
UpdateVehicle(vehicleid1);
                    
PutPlayerInVehicle(playeridVehicleID[vehicleid], 0);
                    
SaveVehicle(vehicleid);
                }
            }
        }
        return 
1;
    } 
Reply
#7

havnt looked over ur entire code, but why are you doing this lol
Код:
if(!strcmp(VehicleNumberPlate[id], PlayerInfo[playerid][pPlate1]) == 0)
ur checking if theyre not equal, if thats intended why not just if ( strcmp(..) )
Reply
#8

This isn't my code; I'm merely just trying it out, as I am a beginner to scripting.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)