ID:171101
 
I'm having problems with some code in my game...

alert("Are you a male or a female?","Prototype","I'm a man!","Female") if("I'm a man!")usr.icon_state="male" else if("Female")usr.icon_state="female"


If I get rid of the "else" in "else if" it's always female, if I add the "else", it's always male. What's the problem?
Take out the "else" in else if.
And, don't you have to make the alert a switch?

[Edit]
switch(alert("Female/Male?",Male",Female"))
if("Male")
src.icon_state = "male"
if("Female")
src.icon_state = "female"
In response to Hell Ramen
...I just SAID..if I get RID of the else..it makes it ALWAYS female..
In response to Hell Ramen
Hell Ramen's nailed the problem. Stick a switch() around that alert().
In response to Crispy
Ah, thanks.