SA-MP Forums Archive
SendClientMessage tag missmatch? How? - 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: SendClientMessage tag missmatch? How? (/showthread.php?tid=378176)



SendClientMessage tag missmatch? How? - Twinklies - 16.09.2012

I am getting tag missmatch for the SendClientMessage o.o
I am using ZCMD and SSCANF2 in my script (if that can help somehow..)
Tried deleting "playerid" but nothing happened.

Код HTML:
CMD:heal(playerid, params[])
{
    if(UsedHeal[playerid]) return SendClientMessage(playerid,COL_RED, "<!>You already used /heal! Wait until you die so you can use it again!");
	if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid,COL_RED,"<!>Not enought money! You must have atleast 500$!");
	GivePlayerMoney(playerid, -500);
	SendClientMessage(playerid,COL_RED,"<!>You have healed yourself to 100HP!");
	SetPlayerHealth(playerid, 100);
	UsedHeal[playerid] = true;
	return 1;
}
Quote:

ProScript.pwn(330) : error 035: argument type mismatch (argument 2)
ProScript.pwn(331) : error 035: argument type mismatch (argument 2)
ProScript.pwn(333) : error 035: argument type mismatch (argument 2)




Re: SendClientMessage tag missmatch? How? - Vince - 16.09.2012

Can you count? It says argument 2! In other words: the color. You probably have it defined as string while it's supposed to be an integer.


Re: SendClientMessage tag missmatch? How? - AtItsMax - 16.09.2012

pawn Код:
CMD:heal(playerid, params[])
{
    if(UsedHeal[playerid]) return SendClientMessage(playerid,-1, "<!>You already used /heal! Wait until you die so you can use it again!");
    if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid,-1,"<!>Not enough money! You must have atleast 500$!");
    GivePlayerMoney(playerid, -500);
    SendClientMessage(playerid,-1,"<!>You have healed yourself to 100HP!");
    SetPlayerHealth(playerid, 100);
    UsedHeal[playerid] = true;
    return 1;
}