Warning 213: tag mismatch! -
Tass007 - 08.03.2016
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(playerid, params[])
{
new vw = GetPlayerVirtualWorld(playerid);
if(PlayerInfo[playerid][HouseID] == 0) return SCM(playerid, COLOR_LIGHTRED, "You do not own a house.");
for(new h = 1; h < sizeof(HouseInfo); h++)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, HouseInfo[h][hEntranceX], HouseInfo[h][hEntranceY], HouseInfo[h][hEntranceZ] && vw == HouseInfo[h][hWorld])) return h;
if(IsPlayerInRangeOfPoint(playerid, 5.0, HouseInfo[h][hEntranceX], HouseInfo[h][hEntranceY], HouseInfo[h][hEntranceZ]))
{
if(h == 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", 3000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
new file4[40];
format(file4, sizeof(file4), HPATH, h);
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", 3000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
new file4[40];
format(file4, sizeof(file4), HPATH, h);
new INI:File = INI_Open(file4);
INI_SetTag(File,"data");
INI_WriteInt(File,"hLocked", HouseInfo[h][hLocked]);
INI_Close(File);
break;
}
}
}
}
}
else
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, HouseInfo[h][hExitX], HouseInfo[h][hExitY], HouseInfo[h][hExitZ] && vw == HouseInfo[h][hInsideWorld])) return h;
if(IsPlayerInRangeOfPoint(playerid, 5.0, HouseInfo[h][hExitX], HouseInfo[h][hExitY], HouseInfo[h][hExitZ]))
{
if(h == 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", 3000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
new file4[40];
format(file4, sizeof(file4), HPATH, h);
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", 3000, 6);
PlayerPlaySound(playerid, 1145, 0.0, 0.0, 0.0);
new file4[40];
format(file4, sizeof(file4), HPATH, h);
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(playerid, 5.0, HouseInfo[h][hEntranceX], HouseInfo[h][hEntranceY], HouseInfo[h][hEntranceZ] && vw == HouseInfo[h][hWorld])) return h;
7102
PHP код:
if(IsPlayerInRangeOfPoint(playerid, 5.0, HouseInfo[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.
Re: Warning 213: tag mismatch! -
Joron - 09.03.2016
{
Else if
Re: Warning 213: tag mismatch! -
SickAttack - 09.03.2016
Are these "
HouseInfo[h][hExitX], HouseInfo[h][hExitY], HouseInfo[h][hExitZ]" floats?
pawn Код:
Float:hExitX,
Float:hExitY,
Float:hExitZ
Re: Warning 213: tag mismatch! -
Tass007 - 09.03.2016
PHP код:
new HouseInfo[500][hInfo];
Is that what you wanted to know?
Re: Warning 213: tag mismatch! -
SickAttack - 09.03.2016
No, post the enumerator "hInfo".
Re: Warning 213: tag mismatch! -
Tass007 - 09.03.2016
I fixed the warnings I moved the ")"
fixed code is:
PHP код:
if(IsPlayerInRangeOfPoint(playerid, 5.0, HouseInfo[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(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if(engine == 0 && Fuel[vehicleid] <= 0)
{
ShowErrorDialog(playerid, "This vehicle is out of fuel.");
return 1;
}
if(engine == 1) { engine = 0; lights = 0; }
else { engine = 1; lights = 1; }
SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
}
case 1:
{
new vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if(lights == 1) lights = 0; else lights = 1;
SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
}
case 2:
{
new vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if(bonnet == 1) bonnet = 0; else bonnet = 1;
SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
}
case 3:
{
new vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
if(boot == 1) boot = 0; else boot = 1;
SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
}
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.0) Fuel[vehicleid] += 20.0;
else Fuel[vehicleid] = 100.0;
SetPVarInt(playerid, "GasCan", 0);
SendClientMessage(playerid, COLOR_WHITE, "You have filled the fuel tank with 20% fuel.");
}
case 5:
{
new id = GetPVarInt(playerid, "DialogValue1");
if(GetPlayerVehicleAccess(playerid, id) < 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(playerid, money);
format(msg, sizeof(msg), "You have sold your vehicle for $%d.", money);
SendClientMessage(playerid, COLOR_WHITE, msg);
RemovePlayerFromVehicle(playerid);
DestroyVehicle(VehicleID[id]);
SaveVehicle(id);
}
case 6:
{
new vehicleid = GetPVarInt(playerid, "DialogValue1");
if(GetPlayerVehicleAccess(playerid, vehicleid) < 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(playerid, COLOR_LIGHTRED, "You don't have enough money. ($700)");
GivePlayerMoney(playerid, -200);
SendClientMessage(playerid, COLOR_WHITE, "You have bought this parking spot for your vehicle.");
UpdateVehicle(vehicleid, 1);
PutPlayerInVehicle(playerid, VehicleID[vehicleid], 0);
SaveVehicle(vehicleid);
}
}
}
return 1;
}
Re: Warning 213: tag mismatch! -
Trucido - 09.03.2016
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(..) )
Re: Warning 213: tag mismatch! -
Tass007 - 09.03.2016
This isn't my code; I'm merely just trying it out, as I am a beginner to scripting.