Create()
if(fexists("players/[src.key].sav"))
src<<"Delete your old savefile first!"
return
var/creating=0
while(!creating)
var/name = input("What Name Would You Like You Character To Have?") as text|null
if(length(name) < 2)
alert("Your Name Must Be Longer Than Two Characters!")
return
if(length(name) > 12)
alert("Your Name Can Not Be Longer Than Twelve Characters!")
return
creating=1
if(!src.name) creating=0
src.name="[name]"
is there a way for me to always make the usr name always uppercase even tho they wrote it lower case.
|
If you just want to capitalize the first letter:
name = uppertext(copytext(name, 1, 2)) + copytext(name, 2) Also, be careful when naming a local variable the same as an object's variable. It's easy to use the wrong one accidentally. You probably also want to be using continue instead of return on those two length checks, as then it will ask them for their name again. Cancel should probably take them out of the New Character flow. You can check if name is null right after the input() and return if so. |
[EDIT] sorry stupid iPhone
use uppertext()