SA-MP Forums Archive
Problem with strcmp passwords. [rep++] - 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 with strcmp passwords. [rep++] (/showthread.php?tid=304499)



Problem with strcmp passwords. [rep++] - Hoborific - 18.12.2011

pawn Код:
new UserPassword[24];
                    format(UserPassword,sizeof(UserPassword),"%s",dini_Get(playernamefile(playerid),"Password"));
                    print(inputtext);
                    print(UserPassword);

                    if(strcmp(inputtext,UserPassword,true,sizeof(UserPassword) ) )
                   
                        {

As you can see I've printed them both for debugging purposes, and they matched, so I can't see why it isn't returning as true :/


Re: Problem with strcmp passwords. [rep++] - Thresholdold - 18.12.2011

if(!strcmp(


Re: Problem with strcmp passwords. [rep++] - Hoborific - 18.12.2011

Well shit son, that's not much of an answer.


Re: Problem with strcmp passwords. [rep++] - [NoV]LaZ - 18.12.2011

Quote:
Originally Posted by Hoborific
Посмотреть сообщение
As you can see I've printed them both for debugging purposes, and they matched, so I can't see why it isn't returning as true :/
strcmp returns 0 if the strings match.


Re: Problem with strcmp passwords. [rep++] - Hoborific - 18.12.2011

How weird. ohwell,
pawn Код:
if(!strcmp(
Fixed. lulz

Rep++


Re: Problem with strcmp passwords. [rep++] - Kaperstone - 18.12.2011

well your script looks fine.
i dont see anything that should make prob.
anyway i suggest you to use y_ini insteand of dini...


Re: Problem with strcmp passwords. [rep++] - Thresholdold - 18.12.2011

Quote:
Originally Posted by Hoborific
Посмотреть сообщение
How weird. ohwell,
pawn Код:
if(!strcmp(
Fixed. lulz

Rep++
That's what I said you noob! Now rep me. ^^