Argument Type Mismatch
#1

Код:
C:\Users\Lewis\Desktop\SARP R112\gamemodes\sarp.pwn(18091) : error 035: argument type mismatch (argument 2)
C:\Users\Lewis\Desktop\SARP R112\gamemodes\sarp.pwn(18092) : error 033: array must be indexed (variable "-unknown-")
pawn Код:
new sendername;
    for(new i=0; i < MAX_PLAYERS; i++)
    {
        GetPlayerName(i, sizeof(sendername), sendername); // Line 18091
        if(sendername == "ALLSAINTS_Taxi_Service")         // Line 18092
        {
            Kick(i);
        }
    }
Please could you take a look and let me know of what the problem could be?

Thanks - Lewis
Reply
#2

pawn Код:
new sendername[MAX_PLAYER_NAME];
for(new i = 0; i < MAX_PLAYERS; i++)
{
     GetPlayerName(i, sendername, sizeof(sendername));
     if(strcmp(sendername, "ALLSAINTS_Taxi_Service", true) == 0)
     {
          Kick(i);
     }
}
Reply
#3

Works. Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)