ID:263889
 
Code:
mob
Ollivander
Click()
switch(input("Hello there! My name is Ollivander, here to choose your wand? What am I saying, it's the wand that chooses the wizard.")in list("Yes", "No"))
if("Yes")
alert("Hmmm...")
if(usr.wandtype = 1)
alert("It seems your wand is Oak, 10 Inches Dragon Heartstring!")
var/obj/DHS10Wand/W = new/obj/DHS10Wand
W.loc = usr
if(usr.wandtype = 2)
alert("It seems your wand is Willow, 10 Inches Phoenix Feather!")
var/obj/PF10Wand/W = new/obj/PF10Wand
W.loc = usr
if(usr.wandtype = 3)
alert("It seems your wand is Yew, 10 Inches Unicorn Tailhair!")
var/obj/DHS10Wand/W = new/obj/UT10Wand
W.loc = usr
if(usr.wandtype = 4)
alert("It seems your wand is Yew, 11 Inches Dragon Heartstring!")
var/obj/DHS11Wand/W = new/obj/DHS11Wand
W.loc = usr
if(usr.wandtype = 5)
alert("It seems your wand is Oak, 11 Inches Phoenix Feather!")
var/obj/PF11Wand/W = new/obj/PF11Wand
W.loc = usr
if(usr.wandtype = 6)
alert("It seems your wand is Willow, 11 Inches Unicorn Tailhair!")
var/obj/UT11Wand/W = new/obj/UT11Wand
W.loc = usr
if(usr.wandtype = 7)
alert("It seems your wand is Willow, 12 Inches Dragon Heartstring!")
var/obj/DHS12Wand/W = new/obj/DHS12Wand
W.loc = usr
if(usr.wandtype = 8)
alert("It seems your wand is Yew, 12 Inches Phoenix Feather!")
var/obj/PF12Wand/W = new/obj/PF12Wand
W.loc = usr
if(usr.wandtype = 9)
alert("It seems your wand is Oak, 12 Inches Unicorn Tailhair!")
var/obj/UT12Wand/W = new/obj/UT12Wand
W.loc = usr
if("No")
alert("Fine, fine. I'm sure it'll find you, even if you don't get it from me")


Problem description:
Hogwarts Journey.dm:53:error: proc definition not allowed inside another proc
Objects.dm:1:error: unbalanced } - These are the errors I get when I compile this. When I put it into a multi-line break they both go away, and the line tha tI didn't put just says obj anyways. When someone first creates their character, they are given a wandtype. Then whenever they talk to Olivander, they're given awand based on their wandtype.
Unindent that horrible mass of if() statements after the alert() once.
In response to Garthor
That's done it, thanks alot!