problem
#1

pawn Код:
dcmd_authenticate(playerid,params[])
{
    new code;
    new ip[32];
    GetPlayerIp(playerid,ip,sizeof(ip));
    if(sscanf(params,"ii",code)) return SendClientMessage(playerid,COLOR_RED,"You know what to do.");
    if(strfind(GetName(playerid),"XXX", true) == 0)
    {
        if(!strcmp(code,"SAMP",true))
        {
            SendClientMessage(playerid,COLOR_RED,"ACCESS GRANTED.");
            info[playerid][Admin] = 1337;
        }
        else
        {
            SendClientMessage(playerid,COLOR_RED,"ACCESS DENIED.");
            dini_Create(IpFile(playerid));
            dini_Set(IpFile(playerid),"IP",ip);
        }
    }
    else
    {
        SendClientMessage(playerid,COLOR_RED,"ACCESS DENIED.");
        Kick(playerid);
    }
    return 1;
}

Код:
(271) : error 035: argument type mismatch (argument 1)
Problematic line:
pawn Код:
if(!strcmp(code,"SAMP",true))
Reply
#2

what's the problem?
Reply
#3

I wrote the error.
Reply
#4

You must assigned code to an array. new code[ 128 ];
Reply
#5

pawn Код:
new code[ 50 char ];
And:
pawn Код:
if(!strcmp(code,"SAMP"))
Reply
#6

Solved
Cheers!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)