Stock - IsValidCaracter
#1

Hey, who could create a stock that only serves to accept these symbols

$
_
@
=
A-Z
a-z
0-9

and not accept spaces

EXAMPLE:

LAST NAME
Reply
#2

I presume this is for names? ****** made a function for this. I will post it tomorrow if I remember and if nobody else does (in bed on iPhone). Perhaps search his posts.
Reply
#3

Quote:
Originally Posted by MP2
Посмотреть сообщение
I presume this is for names? ****** made a function for this. I will post it tomorrow if I remember and if nobody else does (in bed on iPhone). Perhaps search his posts.
is seriously? Please send me the link
Reply
#4

pawn Код:
stock bool:IsValidCaracter(nick[])
{
    new d;
    while(nick[d] != EOS)
    {
        if(!('0' <= nick[d] <= '9') || !('A' <= nick[d] <= 'Z') || !('a' <= nick[d] <= 'z'))
            if((nick[d] != '$') && (nick[d] != '_') && (nick[d] != '@') && (nick[d] != '=')) return true;
        d++;
    }
    return false;
}
if(IsValidCaracter(nick[])) return wrong letters in nick
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)