when i log on my screen turns all black but this has only happened since i sent my friend the ".dmb" file....
my other friend says its from the login...
please check this and see if it is....
Login()
var/class = input("Who do you want to be?","Welcome to [world.name]!") in list ("Wizard","Hero","Warrior","Quit")
..()
switch(class)
if("Hero")
icon='hero.dmi'
icon_state = "not sleeping"
src.name = input("What is your name?") as text
world<<"[src] enters!"
src.loc=locate(14,2,1)
usr <<"Welcome [name]!"
if("Wizard")
icon = 'wizard.dmi'
icon_state = "not sleeping"
src.name = input("What is your name?","Name") as text
world <<"[src] enters!"
src.loc=locate(14,2,1)
usr<<"Welcome [name]!"
if("Warrior")
icon = 'warrior.dmi'
icon_state = "not sleeping"
src.name = input("What is your name?","Name") as text
world <<"[src] enters!"
src.loc=locate(14,2,1)
usr<<"Welcome [name]!"
if("Quit")
del(src)
..()
ID:178673
Apr 18 2002, 1:09 pm
|
|
Apr 18 2002, 1:13 pm
|
|
try putting ..() after the usr<<"welcome [usr]"
|
In response to Winbiko
|
|
var/class = input("Who do you want to be?","Welcome to [world.name]!") in list ("Wizard","Hero","Warrior","Quit")
..() switch(class) Those lines may have been why. Calling a var then telling it to go through Login then calling something may disrupt login so I would say you place it like this. ..() then the code |
(Thought I'd take a moment to simplify it while I was at it.)
mob/Login() (As for the smaller code) If you're doing the same thing regardless of the class they choose, such as setting their starting location and prompting for their name, just put those things after the class choice and it will save space. (Unless you're being paid to program by the line, of course.) |
In response to Thief Jack
|
|
yes, my screen is always black too. it started after i put in my special icons code, i doubt it was that though. ill put the code in here.
mob Login() ..()//!!!Leave that in!!! var/usricon = input ("Which game do you want to get icons from?", "Choose.") in list ("Final Fantasy", "Dragon Warrior") if (usricon == "Final Fantasy") icon= 'ghost.dmi' src.loc = locate(155,42,3)//whatever if (usricon== "Dragon Warrior") icon= 'goofoff.dmi' src.loc = locate(155,42,3)//whatever src.name = input("Choose a name for your character.", "Your Name") |