Strange warning 213: tag mismatch - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Strange warning 213: tag mismatch (
/showthread.php?tid=93557)
Strange warning 213: tag mismatch -
Coicatak - 25.08.2009
Why the fuck do I get these warnings?
pawn Код:
if(!strcmp(cmdtext, "/lock"))
{
if(IsPlayerConnected(playerid))
{
if(TmpCarKeys[playerid] == -1 && TmpCarKeys2[playerid] == -1)
{
SendClientMessage(playerid, RED, "Vous n'avez aucun vйhicule spawned.");
return 1;
}
new Float:x, Float:y, Floart:z;
new cartolock;
GetVehiclePos(TmpCarKeys[playerid], x, y, z); // warning 213: tag mismatch
if(TmpCarKeys[playerid] != -1 && TmpCarKeys2[playerid] == -1) cartolock = TmpCarKeys[playerid];
if(TmpCarKeys2[playerid] != -1)
{
new Float:x2, Float:y2, Floart:z2;
GetVehiclePos(TmpCarKeys2[playerid], x2, y2, z2); // warning 213: tag mismatch
if(PlayerToPoint(10, playerid, x, y, z) && !PlayerToPoint(10, playerid, x2, y2, z2)) cartolock = TmpCarKeys[playerid]; // warning 213: tag mismatch x2
else cartolock = TmpCarKeys2[playerid];
}
CarInfo[cartolock][cLock] = 1;
format(string, sizeof(string), "Vous avez verrouillй les portes de votre %s", GetVehicleName(cartolock));
SendClientMessage(playerid, YELLOW, string);
}
return 1;
}
Re: Strange warning 213: tag mismatch -
Joe Staff - 25.08.2009
Show us where you have defined TmpCarKeys
Re: Strange warning 213: tag mismatch -
Coicatak - 25.08.2009
top of the script, global variable:
pawn Код:
new TmpCarKeys[MAX_PLAYERS], TmpCarKeys2[MAX_PLAYERS];
And PlayerToPoint:
pawn Код:
stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}
it works fine for the rest of the script..
Re: Strange warning 213: tag mismatch -
Joe Staff - 25.08.2009
hah! I see why. Look at you x,y,z defines... "
Floart:z;" I floart occasionally, but never in public.
Re: Strange warning 213: tag mismatch -
Coicatak - 25.08.2009
/facepalm...
Thanks for your quick answers =)