ID:263455
 
Code:
var/mob/character
mob/create_character
Login()
src.loc = locate(47,47,2)
..()
obj/LoginPage/Start
icon = 'archangel.bmp'
density = 1
Click()
world << "<font size = 2><b><font color=blue><b>[usr] has logged in!"
usr.loc=locate(46,25,2)
Log
switch(input("Continue Or Begin?","New or Load?") in list ("New","Load","Quit"))
if("New")
switch(alert("If you have another char, it will be erased & replaced by this one. Are you sure you want to continue?","ALERT","Yes","No"))
if("No")
goto Log
usr.ChooseCharacter()
if("Load")
usr.client.Load()
if("Quit")
usr.Exit()
mob
proc/ChooseCharacter()
usr << "<font size = 3><b><font color=blue>Welcome to Elemental Warfare. If you find any bugs or have any ideas contact me. Thanks"
char_name
var/user_name = input("What would you like your name to be? Please choose a Role Playing name. That means no numbers and also no HTML in your name.","Character Creation",usr.key)as text
if(!user_name)
goto char_name
if(lentext(user_name) > 20)
usr <<"Name too long."
goto char_name
if(lentext(user_name) < 2)
usr <<"Name too short."
goto char_name
for(var/N in un_wanted_names && html)
if(findtext(user_name,N))
alert("That name is not allowed.","Name")
goto char_name
else
usr.name = html_encode(user_name)
switch(input("Please choose a Gender.","Gender") in list("Male","Female"))
if("Male")
switch(input("What Class would you like to be?","Class")as null|anything in list("Fire","Water","Wind","Earth","Tunder","Light","Dark"))
if("Dark")character=new/mob/characters/Male/Dark()
if("Earth")character=new/mob/characters/Male/Earth()
if("Fire")character=new/mob/characters/Male/Fire()
if("Light")character=new/mob/characters/Male/Light()
if("Thunder")character=new/mob/characters/Male/Thunder()
if("Water")character=new/mob/characters/Male/Water()
if("Wind")character=new/mob/characters/Male/Wind()
else
del(usr.client.mob)
if("Female")
switch(input("What Class would you like to be?","Class")in list("Fire","Water","Wind","Earth","Tunder","Light","Dark"))
if("Dark")character=new/mob/characters/Female/Dark()
if("Earth")character=new/mob/characters/Female/Earth()
if("Fire")character=new/mob/characters/Female/Fire()
if("Light")character=new/mob/characters/Male/Light()
if("Thunder")character=new/mob/characters/Female/Thunder()
if("Water")character=new/mob/characters/Female/Water()
if("Wind")character=new/mob/characters/Female/Wind()
else
del(usr.client.mob)
character.name = usr.name
src.client.mob = character
world<<"<font size = 2><b><font color=blue>[name] has join the world!"
character.loc = locate(16,17,1)


Problem description:

The problem is that it keeps logs you out after you log in and when you start a new game it logs you out all together
Look at the switch alert for New.

You gave them a yes or no, but only did the No part. You should have a Yes part also, then links to the Create a Character, in this case, the ChooseCharacter proc.

When you use switches, you have to make sure you code the options in, else it's just going to be there, and do nothing for you.