proc
CreateNewCharacter()
var/nam = input("What is your name?","Name","[src.key]")
if(nam in names) //if the name they choose is in the list of names then try again
alert("Name is taken!")
src.CreateNewCharacter()
else
names += list("[nam]") // put the name they choose in the name list so no one else can use it
Problem description:
It is not recognizing that a name is in the list and therefore letting more than one person have the same name. I think it has to do with the syntax of
names += list("[nam]")
or
if(nam in names)
but I am not sure. Thanks for your help.
Well, firstly no put usr in proc, Ungh! Procs like alert(), input(), view(), oview(), range(), and orange() default to usr. Secondly, that is not how you add to a list. This should work: