What's wrong with this command.
#1

Idk whats wrong. I tried my best but really can't find any tag mismatch.

PHP код:
CMD:hit(playeridparams[])
{
    new 
giveplayerid,moneystring[256];
    if(
sscanf(params"ud"giveplayeridmoney)) return SendClientMessage(playeridRED"[USAGE]: /hit [name/id] [amount]");
    if(
money 10000) return SendClientMessage(playeridRED"The hit must be atleast $10K.");
    if(!
IsPlayerConnected(giveplayerid)) return SendClientMessage(playeridRED"Player not found.");
    if(
giveplayerid == playerid) return SendClientMessage(playeridRED"You can't place a hit on yourself.");
    if(
GetPlayerCash(playerid) < money) return SendClientMessage(playeridRED"You don't have enough money.");
    if(
pInfo[giveplayerid][pBountyPlacedOn] > 0) return SendClientMessage(playeridRED"That player already has a hit contract placed on them.");
    {
        
format(stringsizeof(string), "You have placed a hit contract on %s (%d) for $%d."pInfo[giveplayerid][pNme], giveplayeridmoney);
        
SendClientMessage(playeridYELLOWstring);
        
format(stringsizeof(string), "~y~HIT PLACED ON~n~~b~%s~n~~r~for~n~~g~$%d."pInfo[giveplayerid][pNme], money);
        
GameTextForPlayer(playeridstring40004);
        
format(stringsizeof(string), "~y~HIT PLACED ON YOU BY~n~~b~%s~n~~r~for~n~~g~$%d."pInfo[playerid][pNme], money);
        
GameTextForPlayer(giveplayeridstring40004);
        
format(stringsizeof(string), "~b~%s (%i) ~w~Has Placed A ~r~Hit ~w~On ~b~%s (%i) ~w~For ~g~$%d~w~.",pInfo[playerid][pNme],playerid,pInfo[giveplayerid][pNme],giveplayerid,money);
        
SendClientMessageToAll(COLOR_CYANstring);
        
SendClientMessage(giveplayeridRED"You have a hit contract!");
        
GivePlayerCashEx(playerid,-money);
        
pInfo[playerid][pBountyPlacedOn] = giveplayerid;
        
pInfo[giveplayerid][pBounty] = money;
        
pInfo[giveplayerid][pBountyHour] = 48;
        
pInfo[giveplayerid][pBountyMinute] = 0;
        
pInfo[giveplayerid][pBountyPlacedBy] = playerid;
    }
    return 
true;

Код:
(5073) : warning 213: tag mismatch
(5076) : warning 213: tag mismatch
(5079) : warning 213: tag mismatch
(5082) : warning 213: tag mismatch
Lines:

PHP код:
format(stringsizeof(string), "You have placed a hit contract on %s (%d) for $%d."pInfo[giveplayerid][pNme], giveplayeridmoney);
        
SendClientMessage(playeridYELLOWstring);
        
format(stringsizeof(string), "~y~HIT PLACED ON~n~~b~%s~n~~r~for~n~~g~$%d."pInfo[giveplayerid][pNme], money);
        
GameTextForPlayer(playeridstring40004);
        
format(stringsizeof(string), "~y~HIT PLACED ON YOU BY~n~~b~%s~n~~r~for~n~~g~$%d."pInfo[playerid][pNme], money);
        
GameTextForPlayer(giveplayeridstring40004);
        
format(stringsizeof(string), "~b~%s (%i) ~w~Has Placed A ~r~Hit ~w~On ~b~%s (%i) ~w~For ~g~$%d~w~.",pInfo[playerid][pNme],playerid,pInfo[giveplayerid][pNme],giveplayerid,money);
        
SendClientMessageToAll(COLOR_CYANstring); 
Reply
#2

Show your pInfo and the enum.
Reply
#3

Yeah got it. my mistake. Thank you. The problem was from Enum.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)