inputtext
#1

code(not working):

pawn Код:
if(inputtext == pInfo[playerid][Pass])  //line 155
errors:

pawn Код:
C:\DOCUME~1\User\Desktop\STUNTS~1\FILTER~1\reg.pwn(155) : error 033: array must be indexed (variable "inputtext")
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
whit that(works):

pawn Код:
if(udb_hash(inputtext) == pInfo[playerid][Pass])
but when it is udb_hash when player input password its wrong....

Here is when save pass:

pawn Код:
INI_WriteString(iFile,"Password",inputtext);
pls help
Reply
#2

Again, it's a string. You can't handle strings the same way as you do with integers.

Use strcmp to compare strings.

pawn Код:
if(strcmp(pInfo[playerid][Pass], inputtext, true) == 0)
Reply
#3

You'll probably want case sensitivity for passwords as well, so do:
pawn Код:
if(!strcmp(pInfo[playerid][Pass], inputtext, false))
And is holding the password constantly in a string really necessary? With the right security concerns, I doubt you'll need it more than once (for login).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)