ID:147688
 
client/base_num_characters_allowed = 3
mob/BaseCamp/ChoosingCharacter
Login()
..()
usr.loc=locate(88,79,1)

mob/creating_character
base_save_allowed = 0

Login()
..()
spawn()
CreateCharacter()
src.loc=locate(88,79,1)
world << "[usr] has joined the game."

proc/CreateCharacter()
alert("Welcome to my game")
var/char_name
var/A
do
char_name = input(src, "What is the character's name?", "Create Character", key) as text
A = CheckName(char_name)
while (!A)

if (!char_name)
alert("No name entered! Try Again!")
client.base_ChooseCharacter()
return
var/ckey_name = ckey(char_name)
var/list/characters = client.base_CharacterNames()
if (characters.Find(ckey_name))
alert("You already have a character named that! Please choose another name.")
src.CreateCharacter()
return

var/list/races = new()
races += "Human"
races += "Elf"

var/char_race = input("Choose your class [name]", "Create Character", null) in races


var/mob/new_mob
switch(char_race)

if ("Human") new_mob = new /mob/player/Human()
if ("Elf") new_mob = new /mob/player/Elf()

new_mob.name = char_name
new_mob.gender = gender
new_mob.Class = char_race
new_mob.Level = 1
new_mob.TotalE = 0
new_mob.ENeeded = 100
new_mob.Armor = 0
new_mob.Delay = 1.5

src.client.mob = new_mob
del(src)


When i login it calls the CreateChar proc but it only get to the "Welcome to my game" message it doesn't continue to the char name input.
Im getting nuts so please help my tiny little brain out.

Ty
I do believe that the culprit is how you have that, "do and while" setup. Indent while() over one, then include the name portion indented one under the while(). Also, your alert() is wrong, use alert(src,"message here"), pretty much the default argument to alert() is, "usr", which isn't to be confused with the "user". Or, so as our local caveman would put it - "No usr in proc. ungh".