mob/combatant/player/Login()
..()
Naming
name= input("What will your name be?")
if(src.name== null)
goto Naming
if(src.name=="")
goto Naming
Problem description:This is just a simple code for someone naming their character. It works fine but if someone presses the space bar a couple of times and then clicks ok it doesn't read it as null or "". So how do I get around this?
You need to check the text against the value of ckey(text), ckey() strips out spaces and special characters, so it would look something like this:
Next you shouldn't be using 'goto' at all here, in DM it's bad practice in most cases since loops work more efficently:
That will continue going until a name is selected.