14.05.2012, 19:06
Hello,i've coded this command to issue a ticket to the wanted player:
But when i compile it,i get 9 warnings of this:
warning 213: tag mismatch
Line 3332:
3333:
3337:
3339:
3340:
3347:
3351:
3354:
What's wrong,guys?Thanks.
pawn Код:
CMD:tk(playerid, params[])
{
if(gTeam[playerid] != TEAM_COP) return 0;
if(sscanf(params, "ui", ID)) SendClientMessage(playerid, COLOR_WHITE, "USAGE: /tk <playerid> / <PlayerName>");
if(GetPVarInt(playerid,"TkTime")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"Please wait 5 seconds before issuing again.");
if(GetPlayerWantedLevel(ID) >= 4) return SendClientMessage(playerid, red, "This suspect has more than 4 wanted level,you can't issue a ticket to him.Use /ar instead.");
if(GetDistanceBetweenPlayers(playerid,ID) < 10)
{
new opname[24], pname[24], string[144];
GetPlayerName(playerid, pname, 24);
GetPlayerName(ID, opname, 24);
format(string, sizeof(string), "You have been issued a ticket by %s (%d) - You have been charged $5,000", pname, playerid);
SendClientMessage(ID, COLOR_BLUE, string);
format(string, sizeof(string), "You have issued a ticket %s (%d). You have recieved a collection prize of $1500.", opname, ID);
SendClientMessage(playerid, COLOR_BLUE, string);
for(new i = 0; i != MAX_PLAYERS; ++i)
{
if(!IsPlayerConnected(i))continue;
if(gTeam[i] == TEAM_COP)
{
format(string, sizeof(string), "%s (%d) has issued a ticket to %s (%d). He is no longer wanted.", pname, playerid, opname, ID);
SendClientMessage(i, COLOR_BLUE, string);
}
}
SetPlayerWantedLevel(ID, 0);
SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
GivePlayerMoney(playerid, 1500);
GivePlayerMoney(ID, -5000);
SetPVarInt(playerid, "TkTime", gettime() + 5);
}
return 1;
}
warning 213: tag mismatch
Quote:
C:\Documents and Settings\Symone\Desktop\Cops&Robbers\gamemodes\SF. pwn(3332) : warning 213: tag mismatch C:\Documents and Settings\Symone\Desktop\Cops&Robbers\gamemodes\SF. pwn(3333) : warning 213: tag mismatch C:\Documents and Settings\Symone\Desktop\Cops&Robbers\gamemodes\SF. pwn(3337) : warning 213: tag mismatch C:\Documents and Settings\Symone\Desktop\Cops&Robbers\gamemodes\SF. pwn(3339) : warning 213: tag mismatch C:\Documents and Settings\Symone\Desktop\Cops&Robbers\gamemodes\SF. pwn(3340) : warning 213: tag mismatch C:\Documents and Settings\Symone\Desktop\Cops&Robbers\gamemodes\SF. pwn(3347) : warning 213: tag mismatch C:\Documents and Settings\Symone\Desktop\Cops&Robbers\gamemodes\SF. pwn(3351) : warning 213: tag mismatch C:\Documents and Settings\Symone\Desktop\Cops&Robbers\gamemodes\SF. pwn(3354) : warning 213: tag mismatch |
pawn Код:
if(GetPlayerWantedLevel(ID) >= 4) return SendClientMessage(playerid, red, "This suspect has more than 4 wanted level,you can't issue a ticket to him.Use /ar instead.");
pawn Код:
if(GetDistanceBetweenPlayers(playerid,ID) < 10)
pawn Код:
GetPlayerName(ID, opname, 24);
pawn Код:
SendClientMessage(ID, COLOR_BLUE, string);
pawn Код:
format(string, sizeof(string), "You have issued a ticket %s (%d). You have recieved a collection prize of $1500.", opname, ID);
pawn Код:
format(string, sizeof(string), "%s (%d) has issued a ticket to %s (%d). He is no longer wanted.", pname, playerid, opname, ID);
pawn Код:
SetPlayerWantedLevel(ID, 0);
pawn Код:
GivePlayerMoney(ID, -5000);