ID:262826
 
Code:
mob/player 
Login() world << "<b> \red [usr] logs on!"
alert("Welcome to X-Men Unlimited","Ok")
src.name = input("What is your characters codename","Name",src.key)
switch(input("What is your alignment?")in list("Good", "Evil", "Neutral")
if("Good")
usr.icon = 'good.dmi'
alert("Welcome to the X-Men","Ok")
if("Evil")
alert("Welcome to the Brotherhood","Ok")
usr.icon = 'evil.dmi'
if("Neutral")
alert("Welcome to the Morlocks!","Ok")
usr.icon = 'morlock.dmi'


Problem description:

I am new to coding and everytime I try to complie this I get:

Xmen.dm:7:error: if: missing comma ',' or right-paren ')'

Can anyone let me know what exactly is wrong, I seem to always get some sort of error in my code and I can never solve it.

after a switch input, indent
switch(input(usr,"stuf her")in list("LOL","OMG")
INDENT HERE if("LOL")
INDENT HERE INDENT HERE //stuff

you ident after if() too
Lucky-flame wrote:
Code:
> mob/player 
> Login() world << "<b> \red [usr] logs on!"
> alert("Welcome to X-Men Unlimited","Ok")
> src.name = input("What is your characters codename","Name",src.key)
> switch(input("What is your alignment?")in list("Good", "Evil", "Neutral"))
//see the extra ) at the end? you need that^
> if("Good")
> usr.icon = 'good.dmi'
> alert("Welcome to the X-Men","Ok")
> if("Evil")
> alert("Welcome to the Brotherhood","Ok")
> usr.icon = 'evil.dmi'
> if("Neutral")
> alert("Welcome to the Morlocks!","Ok")
> usr.icon = 'morlock.dmi'
>
>

And always be sure to indent your If() statements after a input() in list() this. So it actually does what its told.
In response to Mechanios
You're forgetting to indent the whole thing, i.e. the lines after the if statements.
In response to Audeuro
mob/player 
Login() world << "<b> \red [src] logs on!"
alert("Welcome to X-Men Unlimited","Ok")
src.name = input("What is your characters codename","Name",src.key)
switch(input("What is your alignment?")in list("Good", "Evil", "Neutral"))
//see the extra ) at the end? you need that^
if("Good")
src.icon = 'good.dmi'
alert("Welcome to the X-Men","Ok")
if("Evil")
alert("Welcome to the Brotherhood","Ok")
src.icon = 'evil.dmi'
if("Neutral")
alert("Welcome to the Morlocks!","Ok")
src.icon = 'morlock.dmi'


This should work better.

Aside from what everyone else said, you don't give them a chance to cancel out, you didn't call mob/Login() with ..() or some variant, and you really don't need to use usr in Login().
By the way, alerts default with an "Ok" button, no need to add it.
In response to Deathstar175
Even with the indent help I still get:

Xmen.dm:15: Inconsistent indentation.

Even with the codes u have provided, I am really new at this, what identation is wrong now?
In response to Lucky-flame
if your new to coding then go here there are tutorials on if statments and they are easy to follow http://www.riddlersoft.com/statementsbyond.htm
In response to Rky_nick
mob/player
Login()
..()
alert("Welcome to X-Men Unlimited","Ok")
world << "<b> \red [src] logs on!"
src.name = input("What is your characters codename","Name",src.key)
switch(input("What is your alignment?")in list("Good", "Evil", "Neutral"))
if("Good")
usr.icon = 'evil.dmi'
if("Evil")
usr.icon = 'good.dmi'
if("Neutral")
usr.icon = 'morlock.dmi'
switch(input("What is your Gender?")in list("Male","Female"))
if("Male")
icon_state = "Male"
if("Female")
icon_state = "Female"


That is what the code is like now and it still has inconsitent Identation, what is wrong?
In response to Lucky-flame
Lucky-flame wrote:
> mob/player
> Login()
> ..()
> alert("Welcome to X-Men Unlimited","Ok")
> world << "<b> \red [src] logs on!"
> src.name = input("What is your characters codename","Name",src.key)
> switch(input("What is your alignment?")in list("Good", "Evil", "Neutral"))
> if("Good")
> usr.icon = 'evil.dmi'
> if("Evil")
> usr.icon = 'good.dmi'
> if("Neutral")
> usr.icon = 'morlock.dmi'
> switch(input("What is your Gender?")in list("Male","Female"))
> if("Male")
> icon_state = "Male"
> if("Female")
> icon_state = "Female"
>

That is what the code is like now and it still has inconsitent Identation, what is wrong?