ID:144451
 
Code:
turf/CHOOSERACE
density = 1
layer = 999
Click()
switch(input("What Race are you?",text) in list("Vah-Shir","Iksar","Human","Gnome","High-Elf","Wood-Elf","Orc","Ogre","Dark-Elf")
if("Vah-Shir")
usr<<"Vah Shirs will be playable in the Shadows of Luclin , until then , please choose another race"
return
if("Iksar")
usr<<"Iksars will be playable in the Ruins of Kunark , until then , please choose another race"
return
if("Human")
usr<<"You have chosen the human race. They are the most odd yet versatile race in all of Norrath. They can be Monks , Warriors , Clerics , Mages , or Rogues.They can be Good OR Evil and are born in Qeynos")
switch(input("Do you want to be a human?",text) in list ("Yes","No")
if("Yes")
usr.human=1
if("No")
usr.human=0
usr<<"You have chosen to not be a human , please re-connect to select another race"
if("Gnome")
usr<<"Gnomes should be playable soon , they are currently being worked on"
return
if("High-Elf")
usr<<"High Elves should be playable soon , they are currently being worked on"
return
if("Wood-Elf")
usr<<"Wood Elves should be playable soon , they are currnently being worked on"
return
if("Dark-Elf")
usr<<"Dark Elves should be playable soon , they are currently being worked on"
return
if("Orc")
usr<<"Orcs should be playable soon , they are currently being worked on"
return
if("Ogre")
usr<<"Ogres should be playable soon , they are currently being worked on"
return


Problem description:Currently I've been having this issue with the switch to input command. There is a sample of the code I am using. It comes up with an error which says.
It apparently is saying this about the first "IF" line of the coding. Any help or suggestions would be greatly appreciated , for I dont know what the problem is with the coding.

Main.DM.106:Error: if: Missing Comma ',' or right paren ')'


You need another paranthesis at the end of switch(). Whenever you do switches and the like, make sure the left and right paranthesis are the same number. 2 left ones need 2 right ones.
turf/CHOOSERACE
density = 1
layer = 999
Click()
top
switch(input("What Race are you?",text) in list("Vah-Shir","Iksar","Human","Gnome","High-Elf","Wood-Elf","Orc","Ogre","Dark-Elf"))
if("Vah-Shir")
usr<<"Vah Shirs will be playable in the Shadows of Luclin , until then , please choose another race"
return
if("Iksar")
usr<<"Iksars will be playable in the Ruins of Kunark , until then , please choose another race"
return
if("Human")
usr<<"You have chosen the human race. They are the most odd yet versatile race in all of Norrath. They can be Monks , Warriors , Clerics , Mages , or Rogues.They can be Good OR Evil and are born in Qeynos")
switch(input("Do you want to be a human?",text) in list ("Yes","No"))
if("Yes")
usr.human=1
if("No")
usr.human=0
usr<<"You have chosen to not be a human"
goto top
if("Gnome")
usr<<"Gnomes should be playable soon , they are currently being worked on"
return
if("High-Elf")
usr<<"High Elves should be playable soon , they are currently being worked on"
return
if("Wood-Elf")
usr<<"Wood Elves should be playable soon , they are currnently being worked on"
return
if("Dark-Elf")
usr<<"Dark Elves should be playable soon , they are currently being worked on"
return
if("Orc")
usr<<"Orcs should be playable soon , they are currently being worked on"
return
if("Ogre")
usr<<"Ogres should be playable soon , they are currently being worked on"
return

you switch statement was a little off so i respaced it also instead of telling them to reconnect just have them goto the top like i added.
~Grand~

In response to KillerGrand
Don't use goto.

Also, you don't know how to use input.

input(thing to send input to (By default, usr), "title", "message", default value) as something in something
In response to KillerGrand
KillerGrand wrote:
>              usr<<"Iksars will be playable in the Ruins of Kunark , until then , please choose another race"


Fan?
In response to DivineO'peanut
What you mean by fan DivineO'peanut.
In response to KillerGrand
Really appreciate the help there Killergrand. The fix to make it go to the top is also one thing I was looking for but didn't know how to do.

Again , thanks for the help guys , pretty new to coding , know a little bit and am working on a new version of the game where not much is yet completed.
In response to KillerGrand
KillerGrand wrote:
What you mean by fan DivineO'peanut.

Ruins of Kunark