ID:169902
 
How do I make it so if I make a list called cuwords
var/cuwords = list("Dick","Douche")
// more cuss words
that if the person enters a name with one of those words in it (For ex. "aDouche" "Douchecock") it makes them repeat their name process?

Also I would like to know how to count the length of text. But please help with the list thing.
I try to use the while(cuwords.Find(usr.names)) but the Find is not an identified var.
In response to DragonMasterGod
For the finding out the length, do this...

if(length(name)<=16)
In response to XxDragonFlarexX
Dude thanks man, any way on finding the text in the list?
In response to DragonMasterGod
Let me look into that.
var/list/words = list("Swearword1","Swearword2","Swearword3")
var/myname = input("What do you want to be called?") as text
if(myname)
for(var/x in words)
if(!findtext(myname,x)) //if we didn't find anything from the words list in "myname"...
src.name = myname //set the name
DragonMasterGod wrote:
How do I make it so if I make a list called cuwords
var/cuwords = list("Dick","Douche")
// more cuss words
that if the person enters a name with one of those words in it (For ex. "aDouche" "Douchecock") it makes them repeat their name process?

You're looking for findtext()

Also I would like to know how to count the length of text.

Use length()!