Alright, I know this is like the most newbiest question heard or "read" on this forum yet but i am all out of ideas. Heres the problem, when the user logs in the user choses his/her/its function, then colour, description, appearance, name, etc. I have broken the code down to a few basics when logged in. This code SHOULD allow the user to pick a name, then team colour, and finally sex. But instead when you finish picking your preferences the user is displayed to, yes, a black screen. Unless the user picks a Blue_F which is the first mob defined under the main coding. If the Blue_F is chosen the user logs in fine but is displayed with no icon. Heres the code...
world
mob = /mob/create_character
mob/create_character
var/mob/character
Login()
var/charactername = input("Please Enter a name below.","Name",src.key)
switch(input("Please select a team colour","Character Selection","Red")in list("Red","Blue"))
if("Red")
switch(input("Please select a gender","Gender","Male")in list("Male","Female"))
if("Male")
character = new /mob/Red_M()
character.loc = locate(1,1,1)
name = key
if("Female")
character = new /mob/Red_F()
character.loc = locate(1,1,1)
name = key
if("Blue")
switch(input("Please select a gender","Gender","Male")in list("Male","Female"))
if("Male")
character = new /mob/Blue_M()
character.loc = locate(1,1,1)
name = key
if("Female")
character = new /mob/Blue_F()
character.loc = locate(1,1,1)
name = key
character.name = charactername
src.client.mob = character
..()
mob/Blue_M
icon = 'Blue_M.dmi'
icon_state = "Blue_M"
mob/Blue_F
icon = 'Blue_F.dmi'
icon_state = "Blue_F"
mob/Red_F
icon = 'Red_F.dmi'
icon_state = "Red_F"
mob/Red_M
icon = 'Red_M.dmi'
icon_state = "Red_M"
//If you need coments just ask and Ill post em.
ID:261808
![]() Jul 26 2003, 6:00 am
|
|
![]() Jul 26 2003, 6:04 am
|
|
try a clean compile, and if that does not work, check if your Blue_F.dmi is alright.
|
I CCed and the blue female has no problems as far as i can think of. Any other ideas? Thanks for trying tho
|
well for one, the two extra lines of code under blue female are doing it! take those lines out, and back up their indentation so they affect it all, not just Blue Females!
|
mob/Blue_F
icon = 'Blue_F.dmi' <---I hope you dont mean these two lines, for they are the two lines that define where the icon is. And they are onlky 1 tab from the margin, it may look like more but it is not. icon_state = "Blue_F" <--- |
world
mob = /mob/create_character mob team_member var team = "red" create_character Login() var/mob/team_member/T = new/mob/team_member T.name = input("Please Enter a name below.","Name",src.key) T.team = input("Please select a team.","Team",red) in list("red","blue") T.gender = input("Please select a sex.","Sex",male) in list(MALE,FEMALE) if(T.team=="red") if(T.gender==MALE) T.icon = 'Red_M.dmi' T.icon_state = "Red_M" else T.icon = 'Red_F.dmi' T.icon_state = "Red_F" else if(T.gender==MALE) T.icon = 'Blue_M.dmi' T.icon_state = "Blue_M" else T.icon = 'Blue_F.dmi' T.icon_state = "Blue_F" src.client.mob = T T.loc = locate(1,1,1) del src that is how I would have done it. It is up to you to do it your way, but in my opinion, this is the ideal way... I haven't compiled it, so you will have to debug. |
you misunderstood me, the last lines in login()
YOu don't want to pull a ..()! You want to delete the character_creation mob! IN THE LOGIN() look at the Blue_F if(), now look at the last lines, those last lines should NOT be under Blue F, they should be back! in the first tab of the procedure! THAT IS WHAT IS MESSING IT UP! |
LOL, I HAD IT LIKE THAT A WHILE AGO AND IT STILL WAS MESSING UP. PLEASE DONT GET MAD, YES I MISUNDERSTOOD YOU I AGREE. LET ME TRY IT AGAIN THOUGH.
|
ok, i have fixed it, thank you for your help and im sorry i made you do some work. Ill try to include you in my special thanks column on my website. Thanks for your help,
The Conjuror |