Problem with strcmp - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem with strcmp (
/showthread.php?tid=254175)
Problem with strcmp -
orrgoren11 - 09.05.2011
I did a login script, and i'm stuck at the check if the password that is in the .ini file, is equals to that the user enterd.
Код:
if(!strcmp(strval(tmp), tmp2, true) == 0){
SendClientMessage(playerid, COLOR_RED, "ERROR.");
}
tmp:
Код:
tmp = strtok(cmdtext, idx);
tmp2:
Код:
tmp2 = dini_Get(file, "Password");
Thank you for the help!
Re: Problem with strcmp -
DRIFT_HUNTER - 09.05.2011
pawn Код:
tmp = strtok(cmdtext, idx);
tmp2 = dini_Get(file, "Password");
if(!strcmp(tmp,tmp2,true))
{
//password correct
}
Re: Problem with strcmp -
orrgoren11 - 09.05.2011
Well thank you very much!