ID:150333
 
Hello all thoss on the board i yet have a nother problem lol i had great succes in making my first char creation menus pop up at first. But now its not so great i added a lot to them and it seems that it keeps repeating. I have gone over teh code ,really, contless times and i don't know whats the problem. Well heres teh code its big, i think i jsut need a fresh pair of eyes to see it.

Login()
var/enteranswer = input("What do you want to do?","(-|Welcome to a Vector-X|-) ") in list ("|-Previous Game-|","|-Create New Character-|","|-Delete Character-|","|-I Want To Leave-|")
switch(enteranswer)
if("|-Previous Game-|")
if("|-Create New Character-|")
var/newcharanswer = alert("<|-WARNING-|>:You are only going to be able to create one character, so choose wisely.(Make sure to read about each Team and Race so you make the right choice) ","<-Player Warning->","(I Understand)")
if(newcharanswer=="(I Understand)")
teamselect()
if("|-Delete Old Game-|")
if("|-I Want To Leave-|")
return
..()

ok now heres login lets go to procs--

teamselect()
var/teamanswer = input("Follower of The.....",) in list ("|-Night Wolves-|","|-Golden Corporation-|","|-Rebels-|")
if(teamanswer=="|-Night Wolves-|")
nightraceselect()
if(teamanswer=="|-Golden Corporation-|")
goldraceselect()
if(teamanswer=="|-Rebels-|")
rebraceselect()
nightraceselect()
var/nightraceamswer = input("Who are you?","",) in list ("-|Species(X)|-","-|Human|-","-|Back|-")
if(nightraceamswer=="-|Species(X)|-")
team= "Night Wolves"
health= 200
healthmax= 200
str= 25
speed=20
def= 10
exp= 0
expneed= 100
level= 1
money=600
head= "Nothing"
eyes= "Nothing"
chest= "Nothing"
legs= "Nothing"
hands= "Nothing"
feet= "Nothing"
overbody= "Nothing"
weaponR= "Nothing"
weaponL= "Nothing"
nightspeclook()
if(nightraceamswer=="-|Human|-")
team= "Night Wolves"
usr.race="Human"
health=100
healthmax= 100
str= 10
speed= 10
def= 5
exp= 0
expneed= 100
level= 1
money= 200
head= "Nothing"
eyes= "Nothing"
chest= "Nothing"
legs= "Nothing"
hands= "Nothing"
feet= "Nothing"
overbody= "Nothing"
weaponR= "Nothing"
weaponL= "Nothing"
nighthumanlook()
if("-|Back|-")
return(teamselect())
..()
nightspeclook()
var/nispeclookanswer = input("What eye color do you want?") in list ("|-(Qualzin)-|","|-(Pzalin)-|","|-(Back)-|")
if(nispeclookanswer=="|-(Qualzin)-|")
icon_state = "Qualzin"
usr.loc = locate("hackstart")
usr.name = input("Choose a name for your character.","Your Name",
usr.name)
usr.race="Qualzin"
world << "[usr.name] has entered the matrix!"
if(nispeclookanswer=="|-(Pzalin)-|")
icon_state = "Pzalin"
usr.loc = locate("hackstart")
usr.name = input("Choose a name for your character.","Your Name",
usr.name)
usr.race="Pzalin"
world << "[usr.name] has entered the matrix!"
if(nispeclookanswer=="|-(Back)-|")
return (nightraceselect())
nighthumanlook()
var/nighthumanswer = input("What eye color do you want?") in list ("|-(Blue)-|","|-(Red)-|","|-(Green)-|","|-(Purple)-|","|-(Yellow )-|","|-(Teal)-|","|-(Back)-|")
if(nighthumanswer=="|-(Blue)-|")
icon_state = "nightblue"
usr.loc = locate("hackstart")
usr.name = input("Choose a name for your character.","Your Name",
usr.name)
world << "[usr.name] has entered the matrix!"
if(nighthumanswer=="|-(Red)-|")
icon_state = "nightred"
usr.loc = locate("hackstart")
usr.name = input("Choose a name for your character.","Your Name",
usr.name)
world << "[usr.name] has entered the matrix!"
if(nighthumanswer=="|-(Green)-|")
icon_state = "nightgreen"
usr.loc = locate("hackstart")
usr.name = input("Choose a name for your character.","Your Name",
usr.name)
world << "[usr.name] has entered the matrix!"
if(nighthumanswer=="|-(Purple)-|")
icon_state = "nightpurple"
usr.loc = locate("hackstart")
usr.name = input("Choose a name for your character.","Your Name",
usr.name)
world << "[usr.name] has entered the matrix!"
if(nighthumanswer=="|-(Yellow)-|")
icon_state = "nightyellow"
usr.loc = locate("hackstart")
usr.name = input("Choose a name for your character.","Your Name",
usr.name)
world << "[usr.name] has entered the matrix!"
if(nighthumanswer=="|-(Teal)-|")
icon_state = "nightteal"
usr.loc = locate("hackstart")
usr.name = input("Choose a name for your character.","Your Name",
usr.name)
world << "[usr.name] has entered the matrix!"
if(nighthumanswer=="|-(Back)-|")
return (nightraceselect())
rebraceselect()
var/rebelraceanswer = input("Who are you?","",) in list ("-|Species(X)|-","-|Human|-","-|Back|-")
if(rebelraceanswer=="-|Species(X)|-")
team= "Rebels"
health= 200
healthmax= 200
str= 25
speed=20
def= 10
exp= 0
expneed= 100
level= 1
money=600
head= "Nothing"
eyes= "Nothing"
chest= "Nothing"
legs= "Nothing"
hands= "Nothing"
feet= "Nothing"
overbody= "Nothing"
weaponR= "Nothing"
weaponL= "Nothing"
rebspeclook()
if(rebelraceanswer=="-|Human|-")
team= "Rebels"
usr.race="Human"
health=100
healthmax= 100
str= 10
speed= 10
def= 5
exp= 0
expneed= 100
level= 1
money= 200
head= "Nothing"
eyes= "Nothing"
chest= "Nothing"
legs= "Nothing"
hands= "Nothing"
feet= "Nothing"
overbody= "Nothing"
weaponR= "Nothing"
weaponL= "Nothing"
rebhumanlook()
if("-|Back|-")
return(teamselect())
..()
rebspeclook()
var/rebspeclookanswer = input("What eye color do you want?") in list ("|-(Qualzin)-|","|-(Pzalin)-|",,"|-(Back)-|")
if(rebspeclookanswer=="|-(Qualzin)-|")
icon_state = "Qualzin"
usr.loc = locate("hackstart")
usr.name = input("Choose a name for your character.","Your Name",
usr.name)
usr.race="Qualzin"
world << "[usr.name] has entered the matrix!"
if(rebspeclookanswer=="|-(Pzalin)-|")
icon_state = "Pzalin"
usr.loc = locate("hackstart")
usr.name = input("Choose a name for your character.","Your Name",
usr.name)
usr.race="Pzalin"
world << "[usr.name] has entered the matrix!"
if(rebspeclookanswer=="|-(Back)-|")
return (rebraceselect())
rebhumanlook()
var/rebhumanlook = input("What eye color do you want?") in list ("|-(Blue)-|","|-(Red)-|","|-(Green)-|","|-(Purple)-|","|-(Yellow )-|","|-(Teal)-|","|-(Back)-|")
if(rebhumanlook =="|-(Blue)-|")
icon_state = "rebblue"
usr.loc = locate("hackstart")
usr.name = input("Choose a name for your character.","Your Name",
usr.name)
world << "[usr.name] has entered the matrix!"
if(rebhumanlook =="|-(Red)-|")
icon_state = "rebred"
usr.loc = locate("hackstart")
usr.name = input("Choose a name for your character.","Your Name",
usr.name)
world << "[usr.name] has entered the matrix!"
if(rebhumanlook =="|-(Green)-|")
icon_state = "rebgreen"
usr.loc = locate("hackstart")
usr.name = input("Choose a name for your character.","Your Name",
usr.name)
world << "[usr.name] has entered the matrix!"
if(rebhumanlook =="|-(Purple)-|")
icon_state = "rebpurple"
usr.loc = locate("hackstart")
usr.name = input("Choose a name for your character.","Your Name",
usr.name)
world << "[usr.name] has entered the matrix!"
if(rebhumanlook =="|-(Yellow)-|")
icon_state = "rebyellow"
usr.loc = locate("hackstart")
usr.name = input("Choose a name for your character.","Your Name",
usr.name)
world << "[usr.name] has entered the matrix!"
if(rebhumanlook =="|-(Teal)-|")
icon_state = "rebteal"
usr.loc = locate("hackstart")
usr.name = input("Choose a name for your character.","Your Name",
usr.name)
world << "[usr.name] has entered the matrix!"
if(rebhumanlook =="|-(Back)-|")
return (rebraceselect())
goldraceselect()
var/goldraceanswer = input("Who are you?","",) in list ("-|Species(X)|-","-|Human|-","-|Back|-")
if(goldraceanswer=="-|Species(X)|-")
team= "Golden Corp."
health= 200
healthmax= 200
str= 25
speed=20
def= 10
exp= 0
expneed= 100
level= 1
money=600
head= "Nothing"
eyes= "Nothing"
chest= "Nothing"
legs= "Nothing"
hands= "Nothing"
feet= "Nothing"
overbody= "Nothing"
weaponR= "Nothing"
weaponL= "Nothing"
goldspeclook()
if(goldraceanswer=="-|Human|-")
team= "Golden Corp."
usr.race="Human"
health=100
healthmax= 100
str= 10
speed= 10
def= 5
exp= 0
expneed= 100
level= 1
money= 200
head= "Nothing"
eyes= "Nothing"
chest= "Nothing"
legs= "Nothing"
hands= "Nothing"
feet= "Nothing"
overbody= "Nothing"
weaponR= "Nothing"
weaponL= "Nothing"
goldhumanlook()
if("-|Back|-")
return(teamselect())
..()
goldspeclook()
var/goldspeclookanswer = input("What eye color do you want?") in list ("|-(Qualzin)-|","|-(Pzalin)-|","|-(Back)-|")
if(goldspeclookanswer=="|-(Qualzin)-|")
icon_state = "Qualzin"
usr.loc = locate("hackstart")
usr.name = input("Choose a name for your character.","Your Name",
usr.name)
usr.race="Qualzin"
world << "[usr.name] has entered the matrix!"
if(goldspeclookanswer=="|-(Pzalin)-|")
icon_state = "Pzalin"
usr.loc = locate("hackstart")
usr.name = input("Choose a name for your character.","Your Name",
usr.name)
usr.race="Pzalin"
world << "[usr.name] has entered the matrix!"
if("|-(Back)-|")
return (goldraceselect())
goldhumanlook()
var/goldhumanlook = input("What eye color do you want?") in list ("|-(Blue)-|","|-(Red)-|","|-(Green)-|","|-(Purple)-|","|-(Yellow )-|","|-(Teal)-|","|-(Back)-|")
if(goldhumanlook =="|-(Blue)-|")
icon_state = "corpblue"
usr.loc = locate("hackstart")
usr.name = input("Choose a name for your character.","Your Name",
usr.name)
world << "[usr.name] has entered the matrix!"
if(goldhumanlook =="|-(Red)-|")
icon_state = "corpred"
usr.loc = locate("hackstart")
usr.name = input("Choose a name for your character.","Your Name",
usr.name)
world << "[usr.name] has entered the matrix!"
if(goldhumanlook =="|-(Green)-|")
icon_state = "corpgreen"
usr.loc = locate("hackstart")
usr.name = input("Choose a name for your character.","Your Name",
usr.name)
world << "[usr.name] has entered the matrix!"
if(goldhumanlook =="|-(Purple)-|")
icon_state = "corppurple"
usr.loc = locate("hackstart")
usr.name = input("Choose a name for your character.","Your Name",
usr.name)
world << "[usr.name] has entered the matrix!"
if(goldhumanlook =="|-(Yellow)-|")
icon_state = "corpyellow"
usr.loc = locate("hackstart")
usr.name = input("Choose a name for your character.","Your Name",
usr.name)
world << "[usr.name] has entered the matrix!"
if(goldhumanlook =="|-(Teal)-|")
icon_state = "corpteal"
usr.loc = locate("hackstart")
usr.name = input("Choose a name for your character.","Your Name",
usr.name)
world << "[usr.name] has entered the matrix!"
if(goldhumanlook =="|-(Back)-|")
return (goldraceselect())
..()

ok theres the huge code line lol i really can't see whats doing it i know im mising something or doing something wrong. I have tried the switch method also so its not that lol. Any help would be dee[ply apreciated thanks

-kalzimere

There are a couple places in the code where you say
if("|-(Back)-|")
when you're not within a switch statement. This if statement always returns true, so it will go back. You probably meant something along the lines of
if(nispeclookanswer =="|-(Back)-|")
and so on in those spots. Or convert the whole thing to a switch statement instead.

As a side note, this seems to be one area of DM that is susceptible to newbie confusion: the if() parts of a switch statement are valid as if statements without the switch part. This can cause unwanted results when you forget the switch part but the code compiles and executes without errors but doesn't quite do the right thing. Perhaps a slightly different notation for cases within a switch would have been better.
In response to Air Mapster
Dude Air Mapster your adviced helped me so much i really apreciate you taking the time to look it over. After i fixed those vack problems it worked perfect lol canm't believe i didn't see it. THANKS AGAIN

-kalzimere