ID:311648
 
(See the best response by Kaiochao.)

usr.name = input("What is your name?") as text
usr.race = input("What is your race?") in list ("Lizard","Human")
if("Lizard")
usr.icon='Lizard.dmi'
usr.icon_state="walk"
usr.Move(locate(1,1,1))
if("Human")
usr.icon='base.dmi'
usr.icon_state="walk"
usr.Move(locate(1,1,1))


I fixed this before but i forgot to save and i forget what exactly i did. When i run it the window to pick my race pops up but when i pick Lizard it makes my base Human. Please help!

Look up switch ...
Maybe...
usr.name = input("What is your name?") as text
usr.race = input("What is your race?") in list ("Lizard","Human")
if(usr.race == "Lizard")
usr.icon='Lizard.dmi'
usr.icon_state="walk"
usr.Move(locate(1,1,1))
if(usr.race == "Human")
usr.icon='base.dmi'
usr.icon_state="walk"
usr.Move(locate(1,1,1))
In response to Gland Mopa
that is the exact same piece of code ..

Switch is what you need here, just search the reference or forums ..
switch(input("What is your race?") in list("Lizard","Human")
if("Lizard")
usr.icon='Lizard.dmi'
switch(input("What is your race?", text) in list("Lizard","Human"))
In response to A.T.H.K
That isn't the same piece of code!
I put if(usr.race == "Lizard") to fix the problem. ò.ó
In response to Gland Mopa
Gland Mopa wrote:
That isn't the same piece of code!
I put if(usr.race == "Lizard") to fix the problem. ò.ó

Well no ... the way the OP has it designed it should of been using switch ...
In response to A.T.H.K
Best response
A switch statement is an easier way of writing a chain of else/if statements (except the if()s under switch() only accept contants, but that's irrelevant).
var answer = input("Pick one!", "Choices") in list("A", "B", "C")
if(answer == "A") src << "Apples!"
else if(answer == "B") src << "Bananas!"
else if(answer == "C") src << "Coconuts?"

// is the same as
var answer = input("Pick one!", "Choices") in list("A", "B", "C")
switch(answer)
if("A") src << "Apples!"
if("B") src << "Bananas!"
if("C") src << "Coconuts?"
else src << "Whaaat?" // this will never be displayed


The correct solution to the OP's problem was to either use a switch() statement or be more specific in his if()s (and for a bit of efficiency, change the second one to "else if").
Thanks for helping everyone, i will try the switch() and hopefully it will work, when i get home.