ID:147542
 
Ok well I was coding my login part of my game and I came upon a error.The error is... Login.dm:43:error: if: missing comma ',' or right-paren ')' now the piece of coding


mob/create_character
var/mob/character
Login()
var/charactername = input("Hello, Pick a name for your character, something you wish for people to call you in the game.","Character Name?") // Ask the character what name they wanna use
var/characterlastname = input("Please input your character's lastname now (it MUST be RP'ish, if not, say good-bye).", "Character's Last Name?") // What last name does the character want?
switch(input("Below pick one of the following backgrounds you wish for your character to be. It determines what skills you get in the game.","Character Background?") in list("Warrior","Knight","Wizard","Magician","Vampire","Summo ner","Cleric")
// is if they chose Knight from the list, and so on. It assigns them the appropriate status, etc.
if ("Warrior")
character = new /mob/characters/Warrior()
if ("Knight")
character = new /mob/characters/Knight()
if ("Wizard")
character = new /mob/characters/Wizard()
if ("Magician")
character = new /mob/characters/Magician()
if ("Vampire")
character = new /mob/characters/Vampire()
if ("Summoner")
character = new /mob/characters/Summoner()
if ("Cleric")
character = new /mob/characters/Cleric()
..()






its on the if warrior line.if you have too copy and paste that exactly to see how its indented correctly and get back to me
On the switch input, after the in list you need 2 parenthesies at the end.

--SSJ4_Gohan_Majin
In response to SSJ4_Gohan_Majin
So I need to put it after the classes in the list? or right after in list
In response to Thunderbolt5
You need an extra ) on the end of your switch() statement.

In other words, you currently have this:

<code>switch(input("Below pick one of the following backgrounds you wish for your character to be. It determines what skills you get in the game.","Character Background?") in ght","Wizard","Magician","Vampire","Summoner","Cleric")</ code>

But you should have this:

<code>switch(input("Below pick one of the following backgrounds you wish for your character to be. It determines what skills you get in the game.","Character Background?") in list("Warrior","Knight","Wizard","Magician","Vampire","Summo ner","Cleric"))</code>
In response to Crispy
also, to make it easier to read on the forums put a "<dm>" before your code and a "</dm>" afterwards
In response to Evil Guy
Thanks guys...