ID:851126
 
(See the best response by Lugia319.)
Code:
mob
oliviadmi
icon = 'olivia.dmi'
icon_state = ""
verb/Buy()//merchant done by Rockinawsome
set src in oview(1) //You will have to manually add the names of the products into the list below, because of the code structure, the first one is done for you.
switch(input("What do you want to buy?","Selling..."") in list("","","","","","","","Cancel")

if("jacket")

switch(alert("jacket costs 0 g, buy it?","Purchase jacket?","Yes","No"))
if("Yes")
if(usr.g>=0)
new/obj/jacket(usr)
usr<<"You bought the jacket for 0 g!"
else
usr<<"<b>You don't have that much g!"
else
usr<<"oliviadmi: Farewell!"


if("gold ears")
switch(alert("gold ears costs 0 g, buy it?","Purchase gold ears?","Yes","No"))
if("Yes")
if(usr.g>=0)
new/obj/gold ears(usr)
usr<<"You bought the gold ears for 0 g!"
else
usr<<"<b>You don't have that much g!"
else
usr<<"oliviadmi: Farewell!"


Problem description:

Best response
My suggestion - stop using "auto coders"? You've got an extra " in the switch statement (or rather in the input part of the switch statement) Not to mention the list doesn't really have anything in it.
ok