wrong login password
#1

hello all I followed this tutorial
https://sampforum.blast.hk/showthread.php?tid=485633
I have checked all the codes and they are correct according to the tut.
But after registration, player can't login as it always says password is Wrong.
Can anyone figure out the ways wrong in the tutorial ?
Reply
#2

Fix the link to help you!
Reply
#3

Quote:
Originally Posted by xeon_inside
Посмотреть сообщение
Fix the link to help you!
link fixed
Reply
#4

this tutorial exactly has a mistake , maybe none has noticed it. in the loading password part , see:
pawn Код:
cache_get_field_content(0, "PASS", pInfo[playerid][Password], mysql, 129);
He used to put the field "PASS"
Look this part when he's searching if the password or userid exists , too:
pawn Код:
mysql_format(mysql, query, sizeof(query),"SELECT `Password` , `ID` FROM `players` WHERE `Username` = '%e' LIMIT 1", Name[playerid]);
Password and PASS, both are difference, now what you have to do is replace PASS with Password , so it will be:
pawn Код:
cache_get_field_content(0, "Password", pInfo[playerid][Password], mysql, 129);
Whenever you get a problem with MySQL, there's a file called "mysql_log.txt" in the server directory , check it, it logs errors that dosen't appear in the compiler it's self be cause they're mysql errors only.
Reply
#5

Thanks for this I will modify it as u said and get back to you.
Reply
#6

Quote:
Originally Posted by Sawalha
Посмотреть сообщение
this tutorial exactly has a mistake , maybe none has noticed it. in the loading password part , see:
pawn Код:
cache_get_field_content(0, "PASS", pInfo[playerid][Password], mysql, 129);
He used to put the field "PASS"
Look this part when he's searching if the password or userid exists , too:
pawn Код:
mysql_format(mysql, query, sizeof(query),"SELECT `Password` , `ID` FROM `players` WHERE `Username` = '%e' LIMIT 1", Name[playerid]);
Password and PASS, both are difference, now what you have to do is replace PASS with Password , so it will be:
pawn Код:
cache_get_field_content(0, "Password", pInfo[playerid][Password], mysql, 129);
Whenever you get a problem with MySQL, there's a file called "mysql_log.txt" in the server directory , check it, it logs errors that dosen't appear in the compiler it's self be cause they're mysql errors only.
wait wait i we have already corrected this mistake when i applyed this tutorial on my gamemode 2 month ago. but this password wrong problem doesn't solved after that
Reply
#7

Quote:
Originally Posted by Sawalha
Посмотреть сообщение
this tutorial exactly has a mistake , maybe none has noticed it. in the loading password part , see:
pawn Код:
cache_get_field_content(0, "PASS", pInfo[playerid][Password], mysql, 129);
He used to put the field "PASS"
Look this part when he's searching if the password or userid exists , too:
pawn Код:
mysql_format(mysql, query, sizeof(query),"SELECT `Password` , `ID` FROM `players` WHERE `Username` = '%e' LIMIT 1", Name[playerid]);
Password and PASS, both are difference, now what you have to do is replace PASS with Password , so it will be:
pawn Код:
cache_get_field_content(0, "Password", pInfo[playerid][Password], mysql, 129);
Whenever you get a problem with MySQL, there's a file called "mysql_log.txt" in the server directory , check it, it logs errors that dosen't appear in the compiler it's self be cause they're mysql errors only.
Thanks a lot for the help it got fixed + rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)