mob
Login()
icon='ICONS.dmi'
world<<"<font color = purple>[src.name] has logged in!"
var/obj/Z=input("Male or Female?")in list("Male","Female")
if(Z=="Male")
src.icon_state="Player_male"
if(Z=="Female")
src.icon_state="Player_female"
var/obj/X=input("What do you want your name to be?(At least 4 letters. 12 Letters or under. No innappropriate names allowed. No numbers or symbols. No spaces.)")
if(length(text) + 12 == X)
src<<"That name is too long."
return
if(length(text) - 4 == X)
src<<"That name is too short."
return
if(findtext(X,"1"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"2"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"3"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"4"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"5"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"6"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"7"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"8"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"9"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"0"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"~"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"`"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"!"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"@"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"#"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"$"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"%"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"^"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"&"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"*"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"("))
src<<"Your name has an invalid character in it."
return
if(findtext(X,")"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"-"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"_"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"="))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"+"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"{"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"}"))
src<<"Your name has an invalid character in it."
return
if(findtext(X," "))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"|"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"'"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"/"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"?"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,";"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,":"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"."))
src<<"Your name has an invalid character in it."
return
if(findtext(X,">"))
src<<"Your name has an invalid character in it."
return
if(findtext(X,","))
src<<"Your name has an invalid character in it."
return
if(findtext(X,"<"))
src<<"Your name has an invalid character in it."
return
if(X=="Maltan")
src<<"You can't have the same name as an NPC!"
return
if(X=="Mary")
src<<"You can't have the same name as an NPC!"
return
if(X=="Jarven")
src<<"You can't have the same name as an NPC!"
return
if(X=="Marcus")
src<<"You can't have the same name as an NPC!"
return
src.name="[X]"
src.charname="[X]"
Problem description: Well, this blocks it well enough when a player tries to use any of these characters, but the return proc doesn't bring them back to the name option... anyone know why?
Here's a much better way of handling what you are trying to do. It checks the characters against acceptable ranges of values, instead of searching for every single possible violation explicitly.
Not only will the example below look cleaner, it will be faster than your method.