ID:178607
 
this is my current code on class selection how could I get this to work (dont ask about the gun/knife... its just some weird thing I though up might want to cut and past it somewhere else so you can see the tabs better I think they are right


mob
icon=/mob/create_character/
gun
icon = 'gun.dmi'


knife
icon = 'knife.dmi'


nightstick
icon='club.dmi'


create_character
var/mob/character
Login()
var/charactername = input("What is your name?","Name",src.key)
switch(input("What type of weapon do you want to be?","Weapon","Gun") in list("Gun","Knife","Nightstick"))
if("Gun")
character = new /mob/gun()
if("Knife")
character = new /mob/knife()
if("Nightstick")
character= new /mob/nightstick()
character.name = charactername
src.client.mob = character
del(src)
ok first of all i see a major problem with your Login(), you have it making a character and at the end in the actual Login() you have del(src), so what its doing is making the character than erasing it as tho never taking place. Move the del(src) to Logout() and keep what you have i dont see what the problem with it is except i dont understand why you would go through the whole trouble of making the actual icon a sub proc() why not just make it straight icon.