[HELP] warning 202: number of arguments does not match definition
#1

What's wrong here? All got same problem


pawn Код:
warning 202: number of arguments does not match definition
LINES:
pawn Код:
SCM(a,COLOR_RED,"Vozivte Prebrzo! Radarot ve fati,vasata brzina bese ",speed,"KM/h, na mesto kade sto e dozvoleno ",limit, "KM/h.");
SCM(a,0xFF1E00FF,"sisis","Voziљ prevelikom brzinom! Radar te je snimio da voziљ ",speed,"mph na mjestu gdje je dozvoljeno ",limit, "mph.");
SCM(a,0xFF1E00FF,"sis","Dobio si kaznu od $",SpeedCameras[b][_fine],".");
SCM(playerid,COLOR_GREEN,"sisis","Ugao radara: ",id," je uspjeљno sacuvan u: ",strval(inputtext),".");
SCM(playerid,COLOR_GREEN,"sisis","Domet radara: ",id," je uspjeљno sacuvan u: ",strval(inputtext),".");
SCM(playerid,COLOR_GREEN,"sisis","Kazna za radar: ",GetPVarInt(playerid,"selected")," je uspjeљno sacuvan u: ",strval(inputtext),".");
SCM(playerid,COLOR_GREEN,"sis","Radar: ",GetPVarInt(playerid,"selected")," ne odgovara mjerenju brzine u mph.");
SCM(playerid,COLOR_GREEN,"sis","Radar: ",GetPVarInt(playerid,"selected")," ne odgovara mjerenju brzine u kmh.");
Reply
#2

Actually , the function property is :
pawn Код:
SendClientMessage(playerid, Color, const message[])
you have added another parameter. that will return the warn that you are reporting.
Reply
#3

So how to fix like if i use this insteald of SendClientMessage
pawn Код:
stock SendClientMessageEx(playerid,color,type[],{Float,_}:...)
{
    new string[128];
    for(new i = 0;i<numargs() -2;i++)
    {
        switch(type[i])
        {
            case 's':
            {
                new result[128];
                for(new a= 0;getarg(i +3,a) != 0;a++)
                {
                    result[a] = getarg(i +3,a);
                }
                if(!strlen(string))
                {
                    format(string,sizeof string,"%s",result);
                } else format(string,sizeof string,"%s%s",string,result);
            }

            case 'i':
            {
                new result = getarg(i +3);
                if(!strlen(string))
                {
                    format(string,sizeof string,"%i",result);
                } else format(string,sizeof string,"%s%i",string,result);
            }

            case 'f':
            {
                new Float:result = Float:getarg(i +3);
                if(!strlen(string))
                {
                    format(string,sizeof string,"%f",result);
                } else format(string,sizeof string,"%s%f",string,result);
            }
        }
    }
    SendClientMessage(playerid,color,string);
    return 1;
}
Reply
#4

just do
pawn Код:
#define SCM SendClientMessageEx
and make sure you have defined the SendClientMessageEx stock.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)