SA-MP Forums Archive
Argument type mismatch (argument 1) - 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: Argument type mismatch (argument 1) (/showthread.php?tid=435149)



Argument type mismatch (argument 1) - Diego_Martinz - 05.05.2013

I'm getting the Argument type mismatch (argument 1) error on this piece of code, specifically the "SendClientMessageToAll line. I can't figure out what's wrong with it.
Код:
CMD:O(playerid, params[])
{
	new sendername[MAX_PLAYER_NAME], string[128];
	GetPlayerName(playerid, sendername, sizeof(sendername));
	format(string, sizeof(string), "(( %s: %s ))", sendername, params);
	SendClientMessageToAll(COL_LIGHTBLUE, string);
	return 1;
}
Can anyone tell me what's wrong with it? Any help is appreciated, thanks.


Re: Argument type mismatch (argument 1) - MattyG - 05.05.2013

Show us where you define COL_LIGHTBLUE, please. By the way, it must be in the format: 0xFFFFFFF. Where the 6 "F"s are a hex code


Re: Argument type mismatch (argument 1) - Diego_Martinz - 05.05.2013

#define COL_LIGHTBLUE "{00C0FF}"

I see where I went wrong, and what the problem is. Thanks for your help!


Re: Argument type mismatch (argument 1) - OpticKiller - 05.05.2013

why are you using CMD:O shouldnt it be
Код:
CMD:o