error 035: argument type mismatch (argument 2)e
#1

Whats the problem ??

error:
PHP код:
error 035argument type mismatch (argument 2
PHP код:
//---------------------------------------------[Kick]-----------------------------------------------------
    
if(strcmp(cmd"/kick"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
            {
                
SendClientMessage(playeridWHITE""COL_ORANGE"KORISTETE:{FFFFFF}: /kick [ID Igraca/Dio Imena] [razlog]");
                return 
1;
            }
            
giveplayerid ReturnUser(tmp);
            if (
PlayerInfo[playerid][pAdmin] >= || PlayerInfo[playerid][pGameMaster] >= 3)
            {
                if(
IsPlayerConnected(giveplayerid))
                {
                    if(
giveplayerid != INVALID_PLAYER_ID)
                    {
                        
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
                        
GetPlayerName(playeridsendernamesizeof(sendername));
                        new 
length strlen(cmdtext);
                        while ((
idx length) && (cmdtext[idx] <= ' '))
                        {
                            
idx++;
                        }
                        new 
offset idx;
                        new 
result[64];
                        while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
                        {
                            
result[idx offset] = cmdtext[idx];
                            
idx++;
                        }
                        
result[idx offset] = EOS;
                        if(!
strlen(result))
                        {
                            
SendClientMessage(playeridWHITE""COL_ORANGE"KORISTETE:{FFFFFF} /kick [ID Igraca/Dio Imena] [razlog]");
                            return 
1;
                        }
                        new 
yearmonth,day;
                        
getdate(yearmonthday);
                        
format(stringsizeof(string), "[GC]Server: %s e isklucen od server od %s, Pricina: %s (%d-%d-%d)"giveplayersendername, (result),month,day,year);
                        
KickLog(string);
                        
format(stringsizeof(string), "[GC]Server: %s e isklucen od server od %s, Pricina: %s"giveplayersendername, (result));
                        
SendClientMessageToAll(COLOR_LIGHTREDstring);
                        
SendClientMessage(COLOR_LIGHTREDstring); //// THIS LINE
                        
Kick(giveplayerid);
                        return 
1;
                    }
                }
            }
            else
            {
                
format(stringsizeof(string), "   %d nije aktivan igrac."giveplayerid);
                
SendClientMessage(playeridCOLOR_GRAD1string);
            }
        }
        return 
1;
    } 
Reply
#2

pawn Код:
SendClientMessage(playerid, COLOR_LIGHTRED, string);
Reply
#3

pawn Код:
//---------------------------------------------[Kick]-----------------------------------------------------
    if(strcmp(cmd, "/kick", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, WHITE, ""COL_ORANGE"KORISTETE:{FFFFFF}: /kick [ID Igraca/Dio Imena] [razlog]");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGameMaster] >= 3)
            {
                if(IsPlayerConnected(giveplayerid))
                {
                    if(giveplayerid != INVALID_PLAYER_ID)
                    {
                        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        new length = strlen(cmdtext);
                        while ((idx < length) && (cmdtext[idx] <= ' '))
                        {
                            idx++;
                        }
                        new offset = idx;
                        new result[64];
                        while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
                        {
                            result[idx - offset] = cmdtext[idx];
                            idx++;
                        }
                        result[idx - offset] = EOS;
                        if(!strlen(result))
                        {
                            SendClientMessage(playerid, WHITE, ""COL_ORANGE"KORISTETE:{FFFFFF} /kick [ID Igraca/Dio Imena] [razlog]");
                            return 1;
                        }
                        new year, month,day;
                        getdate(year, month, day);
                        format(string, sizeof(string), "[GC]Server: %s e isklucen od server od %s, Pricina: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
                        KickLog(string);
                        format(string, sizeof(string), "[GC]Server: %s e isklucen od server od %s, Pricina: %s", giveplayer, sendername, (result));
                        SendClientMessageToAll(COLOR_LIGHTRED, string);
                        SendClientMessage(playerid, COLOR_LIGHTRED, string); //// THIS LINE
                        Kick(giveplayerid);
                        return 1;
                    }
                }
            }
            else
            {
                format(string, sizeof(string), "   %d nije aktivan igrac.", giveplayerid);
                SendClientMessage(playerid, COLOR_GRAD1, string);
            }
        }
        return 1;
    }
Reply
#4

replace ur error line with this

pawn Код:
SendClientMessage(playerid, COLOR_LIGHTRED, string);
Reply
#5

tnx tnx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)