Account not created mysql
#1

hello, i have a problem
in mysql_log :

[04:24:07] [DEBUG] mysql_format - connection: 1, len: 2500, format: "UPDATE `comptes` SET `admin` = %d,`sexe` = %d,`age` = %d,`register` = %d,`tuto` = %d,`ip` = %e,`skin` = %d,`faction` = %d,`rank`..."
[04:24:07] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `comptes` SET `admin` = 0,`sexe` = 0,`age` = 0,`register`", callback: "(null)", format: "(null)"
[04:24:07] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[04:24:07] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.157.75,`skin` = 0,`faction` = 0,`rank` = 0,`jobpv` = 0,`rankjob` = 0,`inte` = 0' at line 1
[04:24:07] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError
[04:26:52] [DEBUG] CMySQLConnection:isconnect - connection was closed
[04:26:52] [DEBUG] CMySQLHandle::~CMySQLHandle - deconstructor called
[04:30:27] [DEBUG] mysql_connect - host: "localhost", user: "root", database: "samp", password: "****", port: 3306, autoreconnect: true, pool_size: 2
[04:30:27] [DEBUG] CMySQLHandle::Create - creating new connection..
[04:30:27] [DEBUG] CMySQLHandle::CMySQLHandle - constructor called
[04:30:27] [DEBUG] CMySQLHandle::Create - connection created (id: 1)
[04:30:27] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[04:30:27] [DEBUG] CMySQLConnection::Connect - connection was successful
[04:30:27] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[04:30:27] [DEBUG] mysql_errno - connection: 1
[04:30:27] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[04:30:27] [DEBUG] CMySQLConnection::Connect - connection was successful
[04:30:27] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[04:30:27] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[04:30:27] [DEBUG] CMySQLConnection::Connect - establishing connection to database...
[04:30:27] [DEBUG] CMySQLConnection::Connect - connection was successful
[04:30:27] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[04:30:27] [DEBUG] CMySQLConnection::Connect - connection was successful
[04:30:27] [DEBUG] CMySQLConnection::Connect - auto-reconnect has been enabled
[04:30:53] [DEBUG] mysql_format - connection: 1, len: 128, format: "SELECT `pass`, `ID` FROM `comptes` WHERE `pseudo` = '%e' LIMIT 1"
[04:30:53] [DEBUG] cache_get_data - connection: 1
[04:30:53] [WARNING] cache_get_data - no active cache
[04:31:02] [DEBUG] mysql_format - connection: 1, len: 2500, format: "UPDATE `comptes` SET `admin` = %d,`sexe` = %d,`age` = %d,`register` = %d,`tuto` = %d,`ip` = %e,`skin` = %d,`faction` = %d,`rank`..."
[04:31:02] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `comptes` SET `admin` = 0,`sexe` = 0,`age` = 0,`register`", callback: "(null)", format: "(null)"
[04:31:02] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[04:31:02] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.157.75,`skin` = 0,`faction` = 0,`rank` = 0,`jobpv` = 0,`rankjob` = 0,`inte` = 0' at line 1
[04:31:02] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError
[04:31:04] [DEBUG] mysql_format - connection: 1, len: 250, format: "INSERT INTO `comptes` (`pseudo`, `pass`) VALUES ('%e', '%e')"
[04:31:04] [DEBUG] cache_insert_id - connection: 1
[04:31:04] [WARNING] cache_insert_id - no active cache



PHP код:
function SavePlayerData(playerid){
    
/*new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"data");*/
    
new Float:vieFloat:armure;
    
GetPlayerHealth(playeridvie);
    
GetPlayerArmour(playeridarmure);
    
//INI_WriteInt(File,"Pass", pinfo[playerid][Pass]);
    
new requete[2500];
    
mysql_format(mysqlrequetesizeof(requete), "UPDATE `comptes` SET `admin` = %d,\
    `sexe` = %d,\
    `age` = %d,\
    `register` = %d,\
    `tuto` = %d,\
    `ip` = %e,\
    `skin` = %d,\
    `faction` = %d,\
    `rank` = %d,\
    `jobpv` = %d,\
    `rankjob` = %d,\
    `inte` = %d,\
    `vw` = %d,\
    `argent` = %d,\
    `banque` = %d,\
    `bancaire` = %d,\
    `bancairesec` = %d,\
    `hacker` = %d,\
    `astuces` = %d,\
    `nbrveh` = %d,\
    `spec` = %d,\
    `bannis` = %d,\
    `jail` = %d,\
    `jailtime` = %d,\
    `level` = %d,\
    `mort` = %d,\
    `crash` = %d,\
    `menotte` = %d,\
    `cagoule` = %d,\
    `nbrmaison` = %d,\
    `nbrmaisonloc` = %d,\
    `nbrbat` = %d,\
    `nbrbiz` = %d,\
    `lastint` = %d,\
    `numtel` = %d,\
    `calling` = %d,\
    `payday` = %d\
    WHERE `ID` = %d"
,
    
pinfo[playerid][Admin],
    
pinfo[playerid][Sexe],
    
pinfo[playerid][Age],
    
pinfo[playerid][Register],
    
pinfo[playerid][Tuto],
    
pinfo[playerid][IP],
    
pinfo[playerid][Skin],
    
pinfo[playerid][Faction],
    
pinfo[playerid][Rank],
    
pinfo[playerid][JobPv],
    
pinfo[playerid][RankJob],
    
pinfo[playerid][Int],
    
pinfo[playerid][Vw],
    
pinfo[playerid][Argent],
    
pinfo[playerid][Banque],
    
pinfo[playerid][Bancaire],
    
pinfo[playerid][BancaireSec],
    
pinfo[playerid][Hacker],
    
pinfo[playerid][Astuces],
    
pinfo[playerid][Id],
    
pinfo[playerid][Spec],
    
pinfo[playerid][Bannis],
    
pinfo[playerid][Jail],
    
pinfo[playerid][JailTime],
    
pinfo[playerid][Level],
    
pinfo[playerid][Mort],
    
pinfo[playerid][Crash],
    
pinfo[playerid][Menotte],
    
pinfo[playerid][Cagoule],
    
pinfo[playerid][NbrMaison],
    
pinfo[playerid][NbrMaisonLoc],
    
pinfo[playerid][NbrBat],
    
pinfo[playerid][NbrBiz],
    
pinfo[playerid][LastInt],
    
pinfo[playerid][NumTel],
    
pinfo[playerid][Calling],
    
pinfo[playerid][PayDay],
    
pinfo[playerid][ID]);
    
mysql_tquery(mysqlrequete"""");
    return 
1;
}
case 
DIALOG_REGISTER:{
            if (!
response) return Kick(playerid);
            if(
response){
                if(!
strlen(inputtext)) return ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT"Enregistrement","> Tu as as entrй un mauvais mot de passe.\nTape un mot de passe pour te crйe un comtpe:","Enregistrer","Quitter");
                
/*new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"data");
                INI_WriteInt(File,"Pass",SHA256_PassHash(inputtext));
                INI_Close(File);*/
                
if(strlen(inputtext) < 5// Si le MDP insйrй fais moins de 5 charactиres
                
{
                    
SendClientMessage(playeridROUGE">"blanc" Votre mot de passe doit contenir au moins 5 charactиres"); // On lui envoye un message disant que le MDP doit contenir au moins 5 charactиres.
                    
ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_PASSWORD""NOM_SERVEUR" - Enregistrement""Tape un mot de passe pour te crйer un compte:""Enregistrer""Quitter");
                }
                else 
// Si le MDP insйrй contient au moins 5 charactиres
                
{
                    new 
requete[512], hashpass[64+1], query[250];
                    
SHA256_PassHash(inputtext"ADAWAD11AWD41ASDA2L222KDH"hashpasssizeof(hashpass));
                    
mysql_format(mysqlquerysizeof(query), "INSERT INTO `comptes` (`pseudo`, `pass`) VALUES ('%e', '%e')"RPName(playerid), hashpass);
                    
pinfo[playerid][ID] = cache_insert_id();
                    
//mysql_tquery(mysql, query, "CreationCompte", "i", playerid);
                    
printf("[Inscription] Nouveau compte inscri. ID de compte: [%d]"pinfo[playerid][ID]);
                    
SavePlayerData(playerid);
                      
PlayerTextDrawShow(playeridTDSexe[playerid][0]);
                    
PlayerTextDrawShow(playeridTDSexe[playerid][1]);
                    
PlayerTextDrawShow(playeridTDSexe[playerid][2]);
                    
PlayerTextDrawShow(playeridTDSexe[playerid][3]);
                    
PlayerTextDrawHide(playeridTDConnexion[playerid][0]);
                      
PlayerTextDrawHide(playeridTDConnexion[playerid][1]);
                    
PlayerTextDrawHide(playeridTDConnexion[playerid][2]);
                    
PlayerTextDrawHide(playeridTDConnexion[playerid][3]);
                    
PlayerTextDrawHide(playeridTDConnexion[playerid][4]);
                    
SelectTextDraw(playerid0x00FF00FF);
                }
                
//ShowPlayerDialog(playerid, DIALOG_SEXE, DIALOG_STYLE_LIST, "Sexe - De quelle sexe est-tu ?", "Homme\nFemme", "Choisir", "Quitter");
            
}
        } 
in onplayerconnect
PHP код:
new requete[128];
    
mysql_format(mysqlrequetesizeof(requete), "SELECT `pass`, `ID` FROM `comptes` WHERE `pseudo` = '%e' LIMIT 1"RPName(playerid));
    
mysql_tquery(mysqlrequete"VerificationCompte""i"playerid);
VerificationCompte(playerid)
{
    new 
ligneschamps;
    
cache_get_data(ligneschampsmysql); // Assigne le nombre de lignes et champs trouver aprиs notre requete dans "OnPlayerConnect"
    
if(lignes// Si la ligne qui correspond a notre requete existe
    
{
        
cache_get_field_content(0"pass"iJoueur[playerid][MDP], mysql66); // Transfиre le contenu de MDP de notre BDD et l'assigne а iJoueur[playerid][MDP]
          
iJoueur[playerid][ID] = cache_get_field_content_int(0"ID"); // Transfиre le contenu de ID de notre BDD et l'assigne а iJoueur[playerid][ID]
          
ShowPlayerDialog(playeridDIALOG_LOGINDIALOG_STYLE_PASSWORD"Connection...""Tapez votre mot de passe pour vous connecter""Connecter""Quitter"); // On lui montre le dialogue de connection.
    
}
    else 
// Si elle n'existe pas
    
{
        
ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT"Inscription...""Tapez un mot de passe pour inscrire ce compte.""S'inscrire""Quitter"); // On lui montre le dialogue d'inscription
    
}

I see the dialogue register but not after textdraw and the account is not created, can you help me please ?
Reply


Messages In This Thread
Account not created mysql - by Skinnz - 04.08.2016, 02:48
Re: Account not created mysql - by TakeiT - 04.08.2016, 03:16
Re: Account not created mysql - by Skinnz - 04.08.2016, 03:20
Re: Account not created mysql - by TakeiT - 04.08.2016, 03:34
Re: Account not created mysql - by Luicy. - 04.08.2016, 03:36
Re: Account not created mysql - by Skinnz - 04.08.2016, 04:11
Re: Account not created mysql - by Vaishnav - 04.08.2016, 04:55
Re: Account not created mysql - by [cS]Owain - 04.08.2016, 05:02
Re: Account not created mysql - by Skinnz - 04.08.2016, 05:29
Re: Account not created mysql - by ActionTanki91 - 04.08.2016, 09:25

Forum Jump:


Users browsing this thread: 3 Guest(s)