SA-MP Forums Archive
problem - 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: problem (/showthread.php?tid=287914)



problem - printer - 05.10.2011

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



Re: problem - System64 - 05.10.2011

what's the problem?


Re: problem - printer - 05.10.2011

I wrote the error.


Re: problem - Jafet_Macario - 05.10.2011

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


Re: problem - aRoach - 05.10.2011

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



Re: problem - printer - 05.10.2011

Solved
Cheers!