I mean Finding a letter or word from a string. Is there a function already made in squirrel?
This is what i coded for making Invalid Kick.
InvalidNicks <- [ "@", "!", "#", "$", "%", "^", "&", "*", "(", ")", "-", "`", "~", ".", "-", "+"];
local Nick = player.Name, i = 1, b = 0;
foreach( char in InvalidNicks )
{
while(i < Nick.len()+1 )
{
if ( Nick.slice( b, i ) == char )
{
Message("[#FF00FF]Kicking:[ " + player.Name + " ] for:[ Invalid Nickname ]");
KickPlayer( player );
return 0;;
}
i++;
b++;
}
i = 1;
b = 0;
}