28.01.2016, 17:26
Hello, what is wrong with this code? Its an INPUT dialog where I must insert an email like this type: something@something.something.
No matter what I type, I get the "Invalid E-Mail!" message.
Thank you!
No matter what I type, I get the "Invalid E-Mail!" message.
Thank you!
PHP код:
if(dialogid == DIALOG_EMAIL)
{
if(response)
{
new F[40], S[20], T[4];
if(sscanf(inputtext, "s[40]p<@>s[20]P<.>s[4]",F, S, T))
{
SelectTextDraw(playerid, BLUES);
ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "You:RPG Registration System:", "Please insert your E-Mail.", "OK", "Cancel");
SCM(playerid, COLOR_DGREY, "Invalid E-Mail!");
}
else
{
if(strlen(inputtext) > 64)
{
SelectTextDraw(playerid, BLUES);
ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "You:RPG Registration System:", "Please insert your E-Mail.", "OK", "Cancel");
SCM(playerid, COLOR_DGREY, "Invalid E-Mail!");
}
else
{
SelectTextDraw(playerid, BLUES);
format(EMailRemember[playerid], 64, inputtext);
PlayerTextDrawSetString(playerid, TextdrawEMail[playerid], EMailRemember[playerid]);
PlayerTextDrawLetterSize(playerid, TextdrawEMail[playerid], 0.225199, 2.690132);
DatePersonale[playerid]++;
}
}
}
else SelectTextDraw(playerid, BLUES);
}