Tag Mismatch Help
#1

Please fix the tag mismatch which occurred on line 3214,
Heres the command
pawn Код:
COMMAND:ar(playerid,params[])
{
    new pId, string[128];
   
    if(gTeam[playerid] == TEAM_COPS)
    {
        if(sscanf(params, "d", pId)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /ar [ID]");
            else if(!IsPlayerConnected(pId)) return SendClientMessage(playerid, 0xFF0000AA, "The ID You Entered Was Not Found.");
                else
                {
                    new Float:x, Float:y, Float:z;
                    GetPlayerPos(pId, x, y, z);
                    if(IsPlayerInRangeOfPoint(playerid, 3.0, x, y, z)) return SCM(playerid, COLOR_RED, "Not Close Enough to Arrest!");
                    {
                        new pname[MAX_PLAYER_NAME], aname[MAX_PLAYER_NAME], string1[250], string2[256], string3[100], string4[100];
                        GetPlayerName(playerid, pname, sizeof(pname));
                        GetPlayerName(pId, aname, sizeof(aname));
                        if(!IsPlayerCuffed(pId)) return SendClientMessage(playerid,0xFF0000AA,"This player has to be cuffed.");
   
                        if (GetPlayerWantedLevel(pId) == 0)
                        {
                            SendClientMessage(playerid, 0xFF0000AA, "This Player Is Not Wanted!");
                            return 1;
                        }
                                       
                        else if (GetPlayerWantedLevel(pId) == 1)
                        {
                            SendClientMessage(playerid, 0xFF0000AA, "Error: this player has too low of a wanted level use /tk");
                            return 1;
                        }
                        else if (GetPlayerWantedLevel(pId) > 1)
                        {
                            new WantedLevel = GetPlayerWantedLevel(pId);
                            TextDrawShowForPlayer(pID,JailTimer[playerid]);
                            format(string,sizeof(string),"Jailtime: %d",WantedLevel*500*60);
                            TextDrawSetString(JailTimer[playerid],string);
                           
                            SetPlayerInterior(pId, 3);
                            new rand = random(sizeof(JailCellSpawns));
                            SetPlayerPos(pId, JailCellSpawns[rand][0], JailCellSpawns[rand][1], JailCellSpawns[rand][2]);
                            SetTimerEx("UnJail",WantedLevel*500*60,0,"i",pId);
                            InJail[pId] = 1;
                            GivePlayerMoney(pId, -WantedLevel*1000);
                            GivePlayerMoney(playerid, WantedLevel*1000);
                            SetPlayerWantedLevel(pId, 0);
                            format(string1, sizeof(string1), "%s(%d) Has Ben Arrested By Officer %s(%d)", aname, pId, pname, playerid);
                            SendClientMessageToAll(0xFF0000AA, string1);
                            format(string2, sizeof(string2), "You Have Ben Sent To Jail For %s Minuets For Having A Level %s Wanted Level!", WantedLevel, WantedLevel);
                            SendClientMessage(pId, 0xFF0000AA, string2);
                            format(string3, sizeof(string3), "You Have Recived A %s000 Bonus For Arresting A Level %s Suspect!", WantedLevel, WantedLevel);
                            SendClientMessage(playerid, 0xFF0000AA, string3);
                            format(string4, sizeof(string4), "You Have Payed A %s000 Penalty On Your Arrest For Having A %s Wanted Level!", WantedLevel, WantedLevel);
                            SendClientMessage(pId, 0xFF0000AA, string4);
                            return 1;
                        }
                    }
                }
            }
            else
            {
                return SendClientMessage(playerid, 0xFF0000AA, "Error: You are not a police officer!");
            }
    return 1;
}
Line 3214
pawn Код:
TextDrawShowForPlayer(pID,JailTimer[playerid]);
Reply
#2

which argumnt ?
Reply
#3

Tag Mismatch on Line 3214
Reply
#4

JailTimer should've been declared with a Text tag:

pawn Код:
new Text: JailTimer[MAX_PLAYERS];
Reply
#5

By the way, you should use Per-Player Textdraws in this case.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)