SA-MP Forums Archive
MySQL Rows Not Created :/ - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL Rows Not Created :/ (/showthread.php?tid=623676)



MySQL Rows Not Created :/ - Yaa - 03.12.2016

Hello

i noticed the rows not created idk why :C

that why i don't get login dialog i think :C

Dialog code :

PHP код:
switch( dialogid )
    {
        case 
DIALOG_REGISTER:
        {
            if (!
response) return Kick(playerid); 
            if (!
inputtext[0] || inputtext[0] == ' ')  return ShowPlayerDialogplayeridDIALOG_REGISTERDIALOG_STYLE_PASSWORD"Register {FF0000}Failed !""You must type a password if you want to register!""Register""Quit" );
            new 
string[150]; 
            if(!(
MIN_PASSWORD_LENGTH <= strlen(inputtext) <= MAX_PASSWORD_LENGTH)) return ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_PASSWORD"Register {FF0000}Failed !"""WHITE"The password must be between 4 and 24 characters!""Register""Quit" ); 
            new 
ip[18]; 
            
GetPlayerIp(playeridipsizeof (ip)); 
            new 
querylist[512];
            
format(querylistsizeof(querylist), "INSERT INTO `accounts`(`name`, `ip`, `password`) VALUES('%s', '%f', '%s')"GetName(playerid), ipinputtext);
            
mysql_query(MySQLquerylist);
            
format(stringsizeof (string), ""GREEN"Thank you %s! You have successfully registered this account. || Money: $%i || Skin: %i"GetName(playerid), PlayerInfo[playerid][pCash], PlayerInfo[playerid][pSkin]);
            
SendClientMessage(playerid, -1string);
        } 



Re: MySQL Rows Not Created :/ - iLearner - 03.12.2016

IP is string, thus %s not %f.


Re: MySQL Rows Not Created :/ - Yaa - 03.12.2016

Quote:
Originally Posted by iLearner
Посмотреть сообщение
IP is string, thus %s not %f.
fixed ! i was dumb

Thank you

+reped