strcmp not working? properly?
#1

Hello, I've have this problem, If I input password, and if it's part is right it allows it trough
Code:
pawn Код:
if(!strcmp(inputtext,Field,false,strlen(Field)))
the thing is: if in database there is pass, and player types in password he will get in the server.
Reply
#2

Just change to:
pawn Код:
if(!strcmp(inputtext,Field,false))
You use the lenght of the password. Let's say, you type "password", it will check the lenght of the Field which is "pass".
Reply
#3

So basicly I am checking "empty" string?
Reply
#4

You used for max lenght the lenght of "pass" (Field). If you input "password", it will only check for the first 4 characters. Removing the lenght since it's optional will fix it. Oh and by the way, be sure you check that the strings are not null. They returns false as well.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)