26.01.2015, 17:59
I guess the problem is here?
No errors its just doesnt register player to database
mysql_debug
No errors its just doesnt register player to database
pawn Код:
case dregister:
{
if(!response) return Kick(playerid);
if(strlen(inputtext) < 6) return ShowPlayerDialog(playerid, dregister, DIALOG_STYLE_INPUT, "Register", "In order to play, you need to register.\nYour password must be at least 6 characters long!", "Register", "Quit");
new query[300];
WP_Hash(pinfo[playerid][Password], 129, inputtext);
mysql_format(mysql, query, sizeof(query), "INSERT INTO `players` (`Username`, `Password`, `IP`, `Admin`, `VIP`, `Money`, `PosX` ,`PosY`, `PosZ`,\
`Score`, `Banned`, `Cuffed`, `Muted`, `Jailed`, `JailTime`, `Drugs`, `DrugAmount`, `Robskill`, `Hitmanskill`, `Terskill`, `TotalRobs`\
`Skin`, `Team`, `Kills`, `Deaths`) VALUES ('%e', '%s', '%s', 0, 0, 0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)", Name[playerid], pinfo[playerid][Password], IP[playerid]);
mysql_tquery(mysql, query, "OnAccountRegister", "i", playerid);
pinfo[playerid][Registered] = 1;
Код:
[20:29:25] [DEBUG] CMySQLResult::CMySQLResult() - constructor called [20:29:25] [DEBUG] Calling callback "OnAccountCheck".. [20:29:25] [DEBUG] cache_get_data - connection: 1 [20:29:25] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called [20:29:34] [DEBUG] mysql_format - connection: 1, len: 300, format: "INSERT INTO `players` (`Username`, `Password`, `IP`, `Admin`, `VIP`, `Money`, `PosX` ,`PosY`, `PosZ`,`Score`, `Banned`, `Cuffed`..." [20:29:34] [ERROR] mysql_format - destination size is too small [20:29:34] [DEBUG] mysql_tquery - connection: 1, query: "INSERT INTO `players` (`Username`, `Password`, `IP`, `Admin`, `V", callback: "OnAccountRegister", format: "i" [20:29:34] [DEBUG] CMySQLQuery::Execute[OnAccountRegister] - starting query execution [20:29:34] [ERROR] CMySQLQuery::Execute[OnAccountRegister] - (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 '' at line 1 [20:29:34] [DEBUG] CMySQLQuery::Execute[OnAccountRegister] - error will be triggered in OnQueryError [20:29:42] [DEBUG] mysql_format - connection: 1, len: 128, format: "UPDATE `players` SET `Admin`=%d, `VIP`=%d, `Money`=%d, `posX`=%f, `posY`=%f, `posZ`=%f,`Score` =%d, `Banned` =%d, `Cuffed` =%d, ..." [20:29:42] [ERROR] mysql_format - destination size is too small [20:29:42] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `players` SET `Admin`=0, `VIP`=0, `Money`=0, `posX`=-3.20", callback: "(null)", format: "(null)" [20:29:42] [DEBUG] CMySQLQuery::Execute[] - starting query execution [20:29:42] [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 '`Cuf' at line 1 [20:29:42] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError