ID:175674
 
for certain races also.

this is the race chosing code:


mob/Login()
var/y = input("Which character will you be?") in list ("rock golem","darf elf","human")
switch(y)
if("fighter")
usr.icon = ‘fighter.dmi’
if("dark elf")
usr.icon = ‘dark elf.dmi’
if("rock golem")
usr.icon = ‘golem.dmi’

what am i doing wrong?
i also need only certain races 2 pick up certain weapons and equip them
mob/Login()
..()
var/y=input("Which character will you be?") in list ("rock golem","darf elf","human")
switch(y)
if("human") icon=‘fighter.dmi’
//Right here you were using the wrong name
if("dark elf") icon=‘dark elf.dmi’
if("rock golem") icon=‘golem.dmi’

-=Ken=-
In response to NeoHaxor
still not working:(
why are you using questoin marks to define icons? it should be single quotes not question marks like
'icon.dmi'

NOT
?icon.dmi?

you should read some tutorials
In response to NeoHaxor
no errors now,but it still wont choose.
i changed it around a bit here it is:

mob/Login()
..()
var/y=input("Which character will you be?") in list ("rock golem","darf elf","human")
switch(y)
if("beastlord") icon='beastlord.dmi'
if("weretiger") icon='were tiger.dmi'


the character is invisible and it wont show menu:(
In response to Kablez
I don't understand why you are checking for unavailable choices in your switch statement, while not checking for already used choices...

mob/Login()
..()
var/y=input("Which character will you be?") in list ("rock golem","darf elf","human")
//This piece should be checked for in the switch statement... this is your problem though.
switch(y)
if("beastlord") icon='beastlord.dmi'
if("weretiger") icon='were tiger.dmi'

Do you understand what you are doing wrong? between this post and my previous one I doubt I can explain it any better.
-=Ken=-
In response to Kablez
its alive!

thnx,with the codes u have i created a new code that chooses!
In response to Kablez
Too bad i didn't get here sooner because i went through the same problem myself and i believe that i have an answer. Hopefully, this will help some other people with the same problem.
<font face="courier">
<font size=2>
//this was the original code

mob/Login()
var/y = input("Which character will you be?") in list ("rock golem","darf elf","human")
switch(y)
if("fighter")
usr.icon = ‘fighter.dmi’
if("dark elf")
usr.icon = ‘dark elf.dmi’
if("rock golem")
usr.icon = ‘golem.dmi’

//this is what you need to change it to
mob/Login()
switch(input("Which character will you be?")in list("rock golem","dark elf","human"))
if("fighter")
usr.icon='fighter.dmi'
if("dark elf")
usr.icon='dark elf.dmi'
if("human")
usr.icon='human.dmi'

In response to Konomendragon
thnx so much! it works now and im getting thro it easily
(20%)