ID:149716
 
Ok, I am making a game. 0 errors. 0 warnings. Or so it says. I have an error nonetheless. Lemme show you!

mob
Hoimin
icon = 'Slimes.dmi'
icon_state = "Hoimin"
verb
Heal()
usr<<"You recover yourself!"
Speak(msg as text)
view()<<"[usr] says [msg] sama!"
WorldChat(msg as text)
world<<"[usr] says [msg] sama!"
Slime
icon = 'Slimes.dmi'
icon_state = "Slime"
verb
Squishitize()
usr<<"You squish around the road"
Speak(msg as text)
view()<<"With great effort, [usr] manages to say [msg]"
WorldChat(msg as text)
world<<"Strains but says [msg]"
Babble
icon = 'Slimes.dmi'
icon_state = "Babble"
verb
Goo()
usr<<"You are nasty"
Speak(msg as text)
view()<<"[usr] squishes [msg]"
WorldChat(msg as text)
world<<"[usr] squishes [msg]"
turf
Grass
icon = 'Slimes.dmi'
icon_state = "Grass"
mob
Login()
switch(input("Pick one")in list("Hoimin","Slime","Babble"))
if("Hoimin")
client.mob = new/mob/Hoimin
usr.Move(locate(1,1,1))
if("Slime")
client.mob = new/mob/Slime
usr.Move(locate(1,1,1))
if("Babble")
client.mob = new/mob/Babble
usr.Move(locate(1,1,1))

Ok, heres the problem. I run the game.
Welcome Choose a class.
Hoimin
Welcome Choose a class.
Hoimin
Welcome Choose a class.
Slime
Welcome Choose a class.
Babble
Welcome Choose a cla...

Ok, you get the picture. The login goes on forever! Can some one help me?
check out I think it is spuzzums class selection demo it is exactly what you are talking about but with vars that you don't have and need
In response to Canar
The problem is that each time the client gets assigned to a new mob it calls the Login() proc. Each time the Login proc is called your giving it a new mob to log into. One way to get arround this would be to create a client variable like this:

client
var/initialized = 0

mob
Login()
..() //let it do it's thing
if(!client.initialized) //if client has NOT been initialized
client.initialized = 1
//put switch statment here inside if statement.
In response to English
English wrote:
The problem is that each time the client gets assigned to a new mob it calls the Login() proc. Each time the Login proc is called your giving it a new mob to log into. One way to get arround this would be to create a client variable like this:

client
var/initialized = 0

mob
Login()
..() //let it do it's thing
if(!client.initialized) //if client has NOT been initialized
client.initialized = 1
//put switch statment here inside if statement.

The way I would recommend is creating a special /mob/new_player type (setting world/mob to it), overriding that Login() to choose a mob. Put your "Bibbles logs in!" message in client/New(), not in mob/Login(), too.
In response to Spuzzum
That would be cleaner. Then you could also isolate that process from logins that would occur from switching mobs during play. I can't believe I didn't think of that ;)