Correct password but wrong ?
#4

Quote:
Originally Posted by CuervO
Посмотреть сообщение
strcmp returns 1 if both strings are not equal, and even not speaking your language I can notice you're passing that to the success part of the login. Check if it's false if you want to check if two strings are equal.
I don't really understand what you would I do.. :/ You want I check if my hashed password is not equal to my variable password and if it is equal, that will login me ?

I do like this :

Код:
if(!strcmp(hashpass,JoueurInfo[playerid][jMDP]))
           {
            INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
			ShowPlayerDialog(playerid,DIALOG_SUCCESS_2,0,"Connection rйussi !","Vous avez йtй correctement connectй au serveur.\nVous pouvez maintenant jouer. Bonne chance !","Jouer !","");
		   }
	      else
           {
            ShowPlayerDialog(playerid,DIALOG_LOGIN,3,"Une erreur est survenue","Vous avez taper un mauvais mot de passe.\nTaper votre mot de passe ci-dessous pour vous connecter.","Se connecter","Quitter");
			return 1;
		   }
(The new code)

EDIT: I didn't see your response Konstantinos, i'll go test it !

EDIT2: That work but now there are other problems ! If I write a different password of mine, that login me but this is not my password ! Also, my .ini file is doesn't create in scriptfiles but I'm sure my #define path is good !

Here :
Код:
#define PATH "LSGW/Comptes/%s.ini"
(Comptes mean Accounts)
Reply


Messages In This Thread
Correct password but wrong ? - by SlayerS - 28.02.2014, 20:02
Respuesta: Correct password but wrong ? - by CuervO - 28.02.2014, 20:27
Re: Respuesta: Correct password but wrong ? - by Konstantinos - 28.02.2014, 20:35
Re : Respuesta: Correct password but wrong ? - by SlayerS - 28.02.2014, 20:55
Re : Correct password but wrong ? - by SlayerS - 01.03.2014, 16:11

Forum Jump:


Users browsing this thread: 1 Guest(s)