03.02.2013, 20:02
Nope, still error. Here is the script:
pawn Код:
#define COLOR_GREEN "{66FF00}"
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
//================================================================//
// MySQL part //
//================================================================//
if(dialogid == DIALOG_REGISTER)
{
if(response)
{
if(!strlen(inputtext) || strlen(inputtext) > 100)
{
SendMessage(playerid, "~r~Error~w~: You must enter a password between 1 and 100 characters.");
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""Blue"Account Registration",""White"Welcome to "Red""SERVER_NAME""White".\n"White"Your character has not been registered.\n"White"Please create a password below:", "Register", "Quit");
}
else if(strlen(inputtext) > 0 && strlen(inputtext) < 100)
{
new escpass[100];
mysql_real_escape_string(inputtext, escpass);
MySQL_Register(playerid, escpass);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, ""Blue"Account Login", ""White"Welcome back to "Red""SERVER_NAME""White".\n"White"This character already exists in the database.\n"White"Please enter the password below:", "Login", "Quit");
}
}
if(!response)
{
SendClientMessage(playerid, COLOR_GREEN, "You have chosen to quit the server.");
Kick(playerid);
}
}