29.01.2014, 14:54
Wow Konstantinos, you are saving me again yesterday you typed working code too.. Is possible to put this character check function to stock, which you sent me yesterday? Thanx mate
pawn Код:
NameCheck (const sz_Name[])
{
new
lenght = strlen(sz_Name);
if (!lenght) return 0;
new
us_count,
sp_count,
pos = strfind(sz_Name, "_", true);
for (new i; i != lenght; ++i)
{
if (sz_Name[i] == '_') ++us_count;
if (sz_Name[i] == ' ') ++sp_count;
}
return (lenght <= 19 && sz_Name[0] >= 'A' && sz_Name [0] <= 'Z' && sz_Name [pos+1] >= 'A' && sz_Name [pos+1] <= 'Z' && us_count == 1 && sp_count == 0);
}