SA-MP Forums Archive
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: Tag Mismatch? (/showthread.php?tid=140828)



Tag Mismatch? - ScottCFR - 10.04.2010

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(GetPlayerVehicleID(playerid) == 520)
    {
      if(!gTeam[playerid] == 7)
      {
        RemovePlayerFromVehicle(playerid);
        SendClientMessage(playerid, RED, "Army ID: Denied");
        }
    }
}
I keep getting a tag mismatch, any help?


Re: Tag Mismatch? - RSX - 10.04.2010

Код:
SendClientMessage(playerid, RED, "Army ID: Denied");
Is this the line?
Mismatch is nice because of reason that it has argument id, give full error message ! Althought it should be RED, so it means sending your #define RED line.


Re: Tag Mismatch? - Torran - 10.04.2010

Quote:
Originally Posted by ScottCFR
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(GetPlayerVehicleID(playerid) == 520)
    {
      if(!gTeam[playerid] == 7)
      {
        RemovePlayerFromVehicle(playerid);
        SendClientMessage(playerid, RED, "Army ID: Denied");
        }
    }
}
I keep getting a tag mismatch, any help?
pawn Код:
if(gTeam[playerid] != 7)



Re: Tag Mismatch? - UsaBoy91 - 10.04.2010

no , it's from here : if(!gTeam[playerid] == 7)

must be:
pawn Код:
if(gTeam[playerid] != 7) /* if gTeam[playerid] is not 7 , do the { }*/
or:
pawn Код:
if(gTeam[playerid] == 7) /* if gteam[playerid] is 7 , do the { }*/



Re: Tag Mismatch? - Torran - 10.04.2010

Quote:
Originally Posted by Angel φ
no , it's from here : if(!gTeam[playerid] == 7)

must be:
pawn Код:
if(gTeam[playerid] != 7) /* if gTeam[playerid] is not 7 , do the { }*/
or:
pawn Код:
if(gTeam[playerid] == 7) /* if gteam[playerid] is 7 , do the { }*/
=
Quote:
Originally Posted by Joe Torran C
Quote:
Originally Posted by ScottCFR
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(GetPlayerVehicleID(playerid) == 520)
    {
      if(!gTeam[playerid] == 7)
      {
        RemovePlayerFromVehicle(playerid);
        SendClientMessage(playerid, RED, "Army ID: Denied");
        }
    }
}
I keep getting a tag mismatch, any help?
pawn Код:
if(gTeam[playerid] != 7)



Re: Tag Mismatch? - ScottCFR - 10.04.2010

For some reason, It wont remove the player from the vehicle. Should i maybe put it under OnPlayerUpdate?


Re: Tag Mismatch? - Torran - 10.04.2010

Quote:
Originally Posted by ScottCFR
For some reason, It wont remove the player from the vehicle. Should i maybe put it under OnPlayerUpdate?
Use OnPlayerStateChange
ALSO If your using 520 cause of hydra then you use GetVehicleModel not VehicleID


Re: Tag Mismatch? - ScottCFR - 10.04.2010

forgot about that, thx


Re: Tag Mismatch? - RSX - 10.04.2010

Quote:
Originally Posted by Joe Torran C
Quote:
Originally Posted by Angel φ
no , it's from here : if(!gTeam[playerid] == 7)

must be:
pawn Код:
if(gTeam[playerid] != 7) /* if gTeam[playerid] is not 7 , do the { }*/
or:
pawn Код:
if(gTeam[playerid] == 7) /* if gteam[playerid] is 7 , do the { }*/
=
Quote:
Originally Posted by Joe Torran C
Quote:
Originally Posted by ScottCFR
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(GetPlayerVehicleID(playerid) == 520)
    {
      if(!gTeam[playerid] == 7)
      {
        RemovePlayerFromVehicle(playerid);
        SendClientMessage(playerid, RED, "Army ID: Denied");
        }
    }
}
I keep getting a tag mismatch, any help?
pawn Код:
if(gTeam[playerid] != 7)
Seriusly GUYS? That even doesn't give this warning(error), he didn't ask that, but you "gained" 3 posts...
and well then which is error line?


Re: Tag Mismatch? - Torran - 10.04.2010

That IS The Warning..
Put if(!gTeam[playerid] == 1) in your script,
It will bring the warning, Tag mismatch