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=593318)



error 035: argument type mismatch (argument 2) - Sh4d0w2 - 04.11.2015

PHP код:
public OnPlayerRequestSpawn(playerid)
{
    new 
team1count GetTeamCount(1);
    new 
team2count GetTeamCount(2);
    switch(
gTeam[playerid])
    {
        case 
0:
        {
            if(
team1count team2count)
            {
                
SendClientMessage(playeridred,"You need to balance both team!");//this line
                
return 0;
            }
        }
        case 
1:
        {
            if(
team2count team1count)
            {
                
SendClientMessage(playeridred,"You need to balance both team!");//this line
                
return 0;
            }
          }
       }
       return 
1;

PHP код:
 error 035argument type mismatch (argument 2



Re: error 035: argument type mismatch (argument 2) - Crayder - 04.11.2015

"red" is the second argument.

Show us where "red" is defined.


Re: error 035: argument type mismatch (argument 2) - Sh4d0w2 - 04.11.2015

Yeah.My mistake tho.It should be COLOR_RED.

PHP код:
#define                 red                                 "{FF0000}" 



Re: error 035: argument type mismatch (argument 2) - Crayder - 04.11.2015

That's your problem. If you have a COLOR_RED then that is probably the correct one.

It should be similar to this:
#define COLOR_RED 0xFF0000FF


Re: error 035: argument type mismatch (argument 2) - Sh4d0w2 - 04.11.2015

Sorry its just a small mistake....BTW thanks for helping