ID:262858
 
Code:
var/charactername = input("What is your name?","Name") as null|text


Problem description:

They can have no names, which messes up everything. How can I nullify this?
var/charactername
while(!charactername)
charactername=input("What is your name?","Name") as null|text
if(!charactername)usr<<"You must enter a name"


That will keep looping until they have entered something as a name.
put

var/charactername = input("What is your name?","Name") as text
In response to Diggsey
That wouldn't change a bit. null|anything gives a cancel option.
In response to Mysame
sorry.
In response to Diggsey
Thanks.
In response to Nick231
Nick231 wrote:
> var/charactername
> while(!charactername)
> charactername=input("What is your name?","Name") as null|text
> if(!charactername)usr<<"You must enter a name"

That will keep looping until they have entered something as a name.

var/charactername
while(!ckey(charactername))
charactername=input("What is your name?","Name") as null|text
if(!ckey(charactername))usr<<"You must enter a name"


You can use that if you want to prevent them of using anything besides letters in their names.