if( dialogid == DIALOG_EMAIL)
{
if(!response) return true;
else
{
new set[100];
format(set,sizeof(set),"SELECT `set` FROM `backup` WHERE `username` = '%s' AND `set` != 0 LIMIT 1",PlayerName(playerid));
mysql_query(set);
{
//backup
new email[100];
format(email,sizeof(email),"INSERT INTO backup (username,email,IP,set) VALUES ('%s','%s','%s',1)",PlayerName(playerid),inputtext,GetPlayerIP(playerid));
mysql_query(email);
SendClientMessage(playerid,COLOR_MBLUE,"Your email adress have been set");
}
else
{
ShowPlayerDialog(playerid,10000,DIALOG_STYLE_MSGBOX,"\t"RED"ERROR","You have already set your email\nplease contact to admin for more support","OK","");
}
}
}
if(!strlen(inputtext) || strlen(inputtext) < 5)
else //<<< here
{
ShowPlayerDialog(playerid,10000,DIALOG_STYLE_MSGBOX,"\t"RED"ERROR","You have already set your email\nplease contact to admin for more support","OK","");
}
if( dialogid == DIALOG_EMAIL)
{
if(!response) return true;
else
{
new set[100];
format(set,sizeof(set),"SELECT `set` FROM `backup` WHERE `username` = '%s' AND `set` != 0 LIMIT 1",PlayerName(playerid));
mysql_query(set);
mysql_store_result();
if(!mysql_num_rows())
{
//backup
new email[100];
format(email,sizeof(email),"INSERT INTO backup (username,email,IP,set) VALUES ('%s','%s','%s',1)",PlayerName(playerid),inputtext,GetPlayerIP(playerid));
mysql_query(email);
SendClientMessage(playerid,COLOR_MBLUE,"Your email adress have been set");
}
else
{
ShowPlayerDialog(playerid,10000,DIALOG_STYLE_MSGBOX,"\t"RED"ERROR","You have already set your email\nplease contact to admin for more support","OK","");
}
}
}
pawn Код:
|
new email[100];
new email[150];
Change
pawn Код:
pawn Код:
If that doesn't work, then turn on debugging via mysql_debug(1); under OnGameModeInit and try it. Then post your debug.txt in the root folder. |
[17:47:48] CMySQLHandler::Query(INSERT INTO backup (username,email,IP,set) VALUES ('[BG]PREDATOR','dore95@abv.bg','10.220.200.12',1) - 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 'set) VALUES ('[BG]PREDATOR','dore95@abv.bg','10.220.200.12',1' at line 1) [17:47:48] >> mysql_free_result( Connection handle: 1 ) [17:47:48] CMySQLHandler::FreeResult() - Result was successfully free'd. |