You can login with any password, and it's never wrong? Please help -
Goldino - 22.01.2013
Hey guys, Just updated my admin/login system to another one. Now theres a problem. When go in game, it asks you for your password, you can type any password you want and it won't say the password is wrong. Heres the whole script. (the admin/login system is put together in the game mode,
http://pastebin.com/A5KLn4ih
I hope you can help me!
Re: You can login with any password, and it's never wrong? Please help -
Vince - 22.01.2013
You only need debug this:
pawn Код:
if(!strcmp(hashpass,pInfo[playerid][Pass])) //If they have insert their correct password
{//then
One very important thing to note is that if either string is empty, strcmp will return 0 (and thus the code in that block will be executed).
Re: You can login with any password, and it's never wrong? Please help -
Goldino - 22.01.2013
So what, delete that?
Re: You can login with any password, and it's never wrong? Please help -
Vince - 22.01.2013
DEBUG! Debug! My god.
https://en.wikipedia.org/wiki/Debugging
Re: You can login with any password, and it's never wrong? Please help -
Goldino - 22.01.2013
Yes, what am I supposed to do with it? Your not helping at all?
Re: You can login with any password, and it's never wrong? Please help -
Goldino - 22.01.2013
Please help? What shall I do?
Re: You can login with any password, and it's never wrong? Please help -
Goldino - 22.01.2013
Help me! Please help! It doesn't save
Re: You can login with any password, and it's never wrong? Please help -
Rupert - 22.01.2013
Hello!
Код:
if(!strcmp(hashpass,pInfo[playerid][Pass]))
This code is wrong. You have to write "true" at the end of the line like this:
Код:
if(!strcmp(hashpass,pInfo[playerid][Pass]), true))
I hope it will help you.
Rupert
Re: You can login with any password, and it's never wrong? Please help -
Rupert - 22.01.2013
Oooops. I wrote it badly. You should try this:
Код:
if(!strcmp(hashpass,pInfo[playerid][Pass], true))
Re: You can login with any password, and it's never wrong? Please help -
Goldino - 23.01.2013
Still doesn't work.