SA-MP Forums

Go Back   SA-MP Forums > SA-MP Server > Server Support

Reply
 
Thread Tools Display Modes
Old 01/07/2020, 11:38 PM   #1
votati
Little Clucker
 
votati's Avatar
 
Join Date: May 2020
Location: Argentina
Posts: 11
Reputation: 0
Exclamation problem with database SQLite

Heyy, I have a problem with my database (SQLite). When I register an account, everything works fine, the system saves the name and its respective password, but, when I log back in, it asks me to enter my account password, right? Well, when I enter the password, it tells me that it is WRONG (and I have entered the correct password), and it is a problem that I have still been able to solve (the game mode is made from 0 for my, forgive my ignorance, I am learning).

Code:
HTML Code:
		case D_LOGIN:
		{
			if(!response) return Kick(playerid);
			{
				new DBResult:resultado, l_sQuery[350];
				format(l_sQuery, sizeof(l_sQuery), "SELECT * FROM `USUARIOS` WHERE Nick = '%q' COLLATE NOCASE AND Password = '%q'", GetPlayerNameEx(playerid), PI[playerid][e_sPassword]);
				resultado = db_query(edb, l_sQuery);
				if(db_num_rows(resultado))
				{
					new l_sString[70];
					
					CargarCuenta(playerid);

					PI[playerid][e_bSesion] = true;

					PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);

					format(l_sString, sizeof(l_sString), "Welcome!, %s", GetPlayerNameEx(playerid));
					Mensaje(playerid, -1, l_sString);
				}
				else
				{
					ShowPlayerDialog(playerid, D_LOGIN, DIALOG_STYLE_PASSWORD, "{FFFFFF}Log In", "{FFBF00}* {FF6262}ERROR: {FFFFFF}The entered password is incorrect.\n{FFBF00}* {FFFFFF}Please re-enter the account password to log in.", "Join", "Leave");
				}
				db_free_result(resultado);
			}
		}
votati is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQLite database problem. DarkLored Scripting Help 0 24/08/2015 02:01 AM
SQLite Database problem Chenko Scripting Help 1 30/08/2013 07:26 PM
sqlite database mixmadamich Scripting Help 1 29/08/2013 01:56 PM
Problem selecting ID and name from SQLite database Cypress Scripting Help 5 13/08/2013 04:51 PM
sqlite weird problem on readin from a database. CJay9209 Scripting Help 0 01/05/2013 02:44 AM


All times are GMT. The time now is 11:00 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.