SA-MP Forums Archive
SendClientMessage And SendClientMessgaeToaLL Argument 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: SendClientMessage And SendClientMessgaeToaLL Argument mismatch ? (/showthread.php?tid=526091)



SendClientMessage And SendClientMessgaeToaLL Argument mismatch ? - rockhopper - 15.07.2014

I used both Send Client Message And Send Client Message To All Both giving errors HERE
Код:
error 035: argument type mismatch (argument 2)
Код:
SendClientMessage(playerid, COL_GREEN, "Server has saved all logged in accounts ");



Re: SendClientMessage And SendClientMessgaeToaLL Argument mismatch ? - Blast3r - 15.07.2014

Show us your color define.


Re: SendClientMessage And SendClientMessgaeToaLL Argument mismatch ? - rockhopper - 15.07.2014

Код:
#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}"
#define COL_GREEN "{00FF22}"
#define COL_LIGHTBLUE "{00CED1}"
HERE


Re: SendClientMessage And SendClientMessgaeToaLL Argument mismatch ? - Blast3r - 15.07.2014

That's the problem, you can't use the { } in SendClientMessage, if you want to use those colors you can do:


pawn Код:
SendClientMessage(playerid, -1, "{00FF22}Message");
Otherwise, if you want to use it the way you do, you'll need the HEX code as of 0xcodes.


Re: SendClientMessage And SendClientMessgaeToaLL Argument mismatch ? - rockhopper - 15.07.2014

Oh thanks a lot


Re: SendClientMessage And SendClientMessgaeToaLL Argument mismatch ? - SanAndreasMP - 15.07.2014

i think "COL_GREEN" is in hex Color, SendClientMessage and SendClientMesaageToAll doesn't allow this.



Put this on top of scripts under includes.
pawn Код:
#define COLOR_GREEN 0x33AA33AA
And replace "COL_GREEN" with "COLOR_GREEN".

Hope it helped.


Re: SendClientMessage And SendClientMessgaeToaLL Argument mismatch ? - rockhopper - 15.07.2014

I have Defined COLORs With HEX code Now but how do i use it like this SendClientMessage(playerid,WHITE,"Hi[OTHERCOLORHERE] How are you ? ");

It sHould result :- HIHow Are You


Re: SendClientMessage And SendClientMessgaeToaLL Argument mismatch ? - Blast3r - 15.07.2014

Quote:
Originally Posted by rockhopper
Посмотреть сообщение
I have Defined COLORs With HEX code Now but how do i use it like this SendClientMessage(playerid,WHITE,"Hi[OTHERCOLORHERE] How are you ? ");

It sHould result :- HIHow Are You
Just used the {color} after the Hi.


Re: SendClientMessage And SendClientMessgaeToaLL Argument mismatch ? - rockhopper - 15.07.2014

Thanks


Re: SendClientMessage And SendClientMessgaeToaLL Argument mismatch ? - rockhopper - 15.07.2014

Not working LOL Very funny :- Hii {COLOR_GREEN} How are you ? This is coming LOL