ID:141401
 
Code:
mob
proc
Create()
var/new_name = null
while(!new_name)
new_name = input(src,"What would you like your name to be?","Name")as text
if (length(new_name) < 2)
src << "<b><small><font color=red>Error:</font> <font color=white>Name was to short.</font></small></b>"
new_name = null
if (length(new_name) > 20)
src << "<b><small><font color=red>Error:</font> <font color=white>Name was to long.</font></small></b>"
new_name = null
if (findtext(new_name,html_stop) == 1)
src << "<b><small><font color=red>Error:</font> <font color=white>No HTML in names.</font></small></b>"
new_name = null
if (findtext(new_name,banned_names) == 1)
src << "<b><small><font color=red>Error:</font> <font color=white>This name is not allowed.</font></small></b>"
new_name = null
src.name = new_name
var
list
html_stop = list("<font","<b","<i","<u","<small","<s")
banned_names = list("{NPC}")


Problem description:
No matter what I put as my name, it always ends up saying:

Error: No HTML in names.
Error: This name is not allowed.

I don't get any errors or runtime errors.
The Needle checked for in the Haystack can't be a list. You'll just have to use a for() loop.
for(var/t in html_stop)if(findtext(new_name,t))
src << //blah blah.
new_name=null
break
In response to Kaiochao
Cheers.