22.08.2012, 07:50
Hello!
I made a dialog for my players to type their e-mail,to let me contact them.
But I want to check if the player wrote in the DIALOG_STYLE_INPUT an e-mail,with letters or numbers and with a '.' (dot) and an '@'.
How can I do that? I can check only if is numeric.
I made a dialog for my players to type their e-mail,to let me contact them.
But I want to check if the player wrote in the DIALOG_STYLE_INPUT an e-mail,with letters or numbers and with a '.' (dot) and an '@'.
How can I do that? I can check only if is numeric.
Код:
stock IsNumeric(string[]) { for (new i = 0, j = strlen(string); i < j; i++) { if (string[i] > '9' || string[i] < '0') return 0; } return 1; }