No clue whats going on with my old script. It keeps telling me that the mysql cannot save to my database because th ecommands are out of sync.
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch (dialogid)
{
case DIALOG_REGISTER:
{
if(strlen(inputtext) == 0)
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Registration", "Your account isnt registered. Please insert a password to continue.", "Register", "");
}
else
{
new passwordText[60], query[60], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
mysql_real_escape_string(inputtext, passwordText);
format(query,sizeof(query), "INSERT INTO accounts (playerName, playerPass`) VALUES ('%s', '%s')", name,passwordText);
mysql_query(query);
}
}
}
return 1;
}
PHP код:
[21:56:44] >> mysql_query( Connection handle: 1 )
[21:56:44] CMySQLHandler::Query(INSERT INTO accounts (playerName, playerPass`) VALUES ('yll) - An error has occured. (Error ID: 2014, Commands out of sync; you can't run this command now)
[21:56:44] OnQueryError() - Called.