SA-MP Forums Archive
error 035: argument type mismatch (argument 2) - 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: error 035: argument type mismatch (argument 2) (/showthread.php?tid=506536)



error 035: argument type mismatch (argument 2) - rockhopper - 13.04.2014

I searched the forum i didn't find my error please help..
CODE Where the error is :-
Код:
CMD:ncmds(playerid, params[])
{
  SendClientMessage(playerid,"THE NEW CMDS ARE /waterdm");
  return 1;
ITS ON SendClientMessage line

I am actually making a cmd script using zcmd .. HELP ME ..


Re: error 035: argument type mismatch (argument 2) - mrkiller90 - 13.04.2014

mayby because you didn't close brackets "{}" ?

pawn Код:
CMD:ncmds(playerid, params[])
{
  SendClientMessage(playerid,"THE NEW CMDS ARE /waterdm");
  return 1;
}



Re: error 035: argument type mismatch (argument 2) - Bingo - 13.04.2014

You are missing one parameter .

pawn Код:
SendClientMessage(playerid,COLOR_RED, "THE NEW CMDS ARE /waterdm");
On top add this
pawn Код:
#define COLOR_RED 0xFF0000FF
and add } closing bracket.

So here's your full command:-
pawn Код:
CMD:ncmds(playerid, params[])
{
  SendClientMessage(playerid,COLOR_RED, "THE NEW CMDS ARE /waterdm");
  return 1;
}



Re: error 035: argument type mismatch (argument 2) - Kruzz - 13.04.2014

https://sampwiki.blast.hk/wiki/SendClientMessage - itțs SendClientMessage(playerid, color, message); - add a color...
Then close the bracket.


Re: error 035: argument type mismatch (argument 2) - rockhopper - 13.04.2014

I have another prob ..
how do i make this cmd only for army ?
Код:
CMD:drop(playerid, params[])
SendClientMessage(playerid, COLOR_GHOSTWHITE,"YOU HAVE SUCCESSFULLY DROPPED OVER TERRORIST BASE");
SetPlayerPos(playerid, MY POSITION)



Re: error 035: argument type mismatch (argument 2) - rockhopper - 13.04.2014

please help needed +rep For who helps


Re: error 035: argument type mismatch (argument 2) - Flake. - 13.04.2014

You could try make yourself insted of 'Make this for rep!!' (Not that you can even give meaningful rep)

Never the less..

pawn Код:
CMD:drop(playerid, params[])
{
    if(GetPlayerTeam(playerid) == TEAM_NAME) //Obviously change 'TEAM_NAME' to your team name/number
    {
        SendClientMessage(playerid,COLOR_RED, "You dropped in to the base!"); //Success!
    }
    else SendClientMessage(playerid,COLOR_RED, "You're not on the right team!"); //If their team doesn't equal TEAM_NAME
    return 1;
}



Re: error 035: argument type mismatch (argument 2) - rockhopper - 13.04.2014

thank you sorry for that rep thing