29.09.2013, 21:09
I decided to learn SQL, and changed my login system from YINI to SQLite. When you register an account, it does not write your info to the database, and therefore, you cannot log in. Whats the issue?
The database is blank after registering.
pawn Код:
if(dialogid == DIALOG_REGISTER)
{
if (!response) return Kick(playerid);
if(response)
{
format(Query, sizeof(Query), "INSERT INTO `ACCOUNTS` (`NAME`, `PASSWORD`, `IP`, `LEVEL`, `CASH`, `ADMINLEVEL`, `HOURS`, `JOB`, `BANNED`, `SPAWN`, `BANK`, `FOOD`, `WATER`, `SKIN`, `FACTION`, `FACTION LEVEL`) VALUES('%s','%s','%s', '1', '2000', '0', '0', '0', '0', '0', '0', '432000', '432000', '2', '0', '0')", DB_Escape(name), DB_Escape(inputtext), DB_Escape(ip));
db_query(survival, Query);
GivePlayerMoney(playerid, 2000);
SetSpawnInfo(playerid, 0, 1, 1242.0341,327.7363,19.7555, 0, 0, 0, 0, 0, 0, 0 );
SpawnPlayer(playerid);
//ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", "Enter your password below:", "Login", "Cancel");
return 1;
}
}