inputtext help
#3

Quote:
Originally Posted by tyler12
Посмотреть сообщение
Hello,

Im trying to get my register system to work.
On this line, im getting many errors.

pawn Код:
if(inputtext) == PlayerInfo[playerid][pPass])
NFT.pwn(386) : error 033: array must be indexed (variable "inputtext")
NFT.pwn(386) : error 029: invalid expression, assumed zero
NFT.pwn(386) : warning 215: expression has no effect
NFT.pwn(386) : error 001: expected token: ";", but found ")"
NFT.pwn(386) : fatal error 107: too many error messages on one line
You cannot compare strings with ==, you must use strcmp. However, I still don't quite
understand what you are trying to achieve by comparing inputtext to pPass variable. Or
did you load the password of the player to the variable before this check?

But if you have the password stored in pPass variable, you should use this script then.
pawn Код:
if(!strcmp(PlayerInfo[playerid][pPass], inputtext, false)) { // Passwords do match
And you should also hash your passwords (Whirlpool/SHA2), salting wouldn't hurt either.
Storing passwords as plain text is a great security vulnerability.
Reply


Messages In This Thread
inputtext help - by tyler12 - 03.08.2012, 13:06
Re: inputtext help - by Sascha - 03.08.2012, 13:11
Re: inputtext help - by Johnson_boy - 03.08.2012, 13:12
Re: inputtext help - by tyler12 - 03.08.2012, 13:21
Re: inputtext help - by Vince - 03.08.2012, 13:25
Re: inputtext help - by Johnson_boy - 03.08.2012, 13:25
Re: inputtext help - by tyler12 - 03.08.2012, 13:28
Re: inputtext help - by Hayden_Almeida - 12.11.2015, 17:32

Forum Jump:


Users browsing this thread: 2 Guest(s)