22.08.2015, 21:49
Hello need help i got error mysql and cant fix it
Error line full
Код:
CMySQLHandler::Query(INSERT INTO `ServerPlayers` (`User`, `Password`, `IP`) VALUES ('', '7746DF345F54547871B4F2A6E2299A34224C53ECA63BA5CCAE06B1A8457F1) - An error has occured. (Error ID: 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 ''7746DF345F54547871B4F2A6E2299A34224C53ECA63BA5CCAE06B1A8457F1' at line 1)
Код:
case RegisterDialog: { if(!response) return Kick(playerid); if(strlen(inputtext) > 0) { new salt[11]; for(new i; i < 10; i++) { salt[i] = random(79) + 47; } salt[10] = 0; SHA256_PassHash(inputtext, salt, AccountInfo[playerid][pPassword], 65); new String[200], Query[130]; format(Query, sizeof(Query), "INSERT INTO `ServerPlayers` (`User`, `Password`, `Salt`) VALUES ('%s', '%s', '%s')", AccountInfo[playerid][pName], AccountInfo[playerid][pPassword], salt); mysql_query(Query); AccountInfo[playerid][Newbie] = 1; // Nustatom, kad naujokas. AccountInfo[playerid][LoggedIn] = 1; // Nustatom, kad dar nepadarė 'Spawn'! HowMuchRegisteredPlayers ++; // Kiek iљ viso uћregistruotų ћaidėjų serverį. format(String, sizeof(String), "{F2F2F2}Vardas: {01df74}%s{F2F2F2} įregistruotas į duomėnų bazę.\nPradėti ћaisti galite paspaudę {01df74}'Spawn' {F2F2F2}arba {01df74}'Shift'{F2F2F2} mygtukus.\n", PlayerName(playerid)); ShowPlayerDialog(playerid, AccountCreatedDialog, DIALOG_STYLE_MSGBOX, "{F2F2F2}Sąskaita uћregistruota!", String, "Uћdaryti", ""); } else { StartPlayerLogin(playerid); } }