SA-MP Forums Archive
Problem - 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)
+--- Thread: Problem - tag mismatch (/showthread.php?tid=400747)



Problem - tag mismatch - Frede - 20.12.2012

i have made this code:
Код:
CMD:hug(playerid,params[])
{
	new health;
	if(health < 100)
	{
		new Index;
		new tmp[128];  tmp  = strtok(params,Index);
		new player1 = strval(tmp);
                GetPlayerHealth(player1, health); // the problem is this
		SetPlayerHealth(player1, health + 25);
		SendClientMessage(playerid, 0xFFFFFF, "You gave a player a hug");
		return 1;
	}
}
i always get this warning: "tag mismatch" what have i done wrong


Re: Problem - tag mismatch - [HK]Ryder[AN] - 20.12.2012

use this
pawn Код:
CMD:hug(playerid,params[])
{
    new Float:health;
    if(health < 100)
    {
        new Index;
        new tmp[128];  tmp  = strtok(params,Index);
        new player1 = strval(tmp);
                GetPlayerHealth(player1, health); // the problem is this
        SetPlayerHealth(player1, health + 25);
        SendClientMessage(playerid, 0xFFFFFF, "You gave a player a hug");
        return 1;
    }
}



Re: Problem - tag mismatch - Frede - 20.12.2012

Thank you