Cook
icon = 'Npcs.dmi'
icon_state = "cook"
DblClick()
switch(input("What would you like to do?",,"Buy","Sell"))
if("Sell")
var/obj/O = input("What do you wish to sell?")as obj in src.contents
switch(alert(usr,"Do you wanna sell [O] for [O.sell] Gold?"," ","Yes","No"))
if("Yes")
usr.gld += O.sell
del O
if("No")
src <<output("Fine.","comwindow")
if("Buy")
switch(alert(usr,"What do you want to buy?"," ","Herb","Corn","Nothing"))
if("Herb")
if(usr.gld >= 10)
src <<output("You buy a Herb!","comwindow")
new/item/Herb(usr)
usr.gld -= 10
else
src <<output("You need 10 gold","comwindow")
if("Corn")
if(usr.gld >= 20)
src <<output("You buy a Corn","comwindow")
new/item/Corn(usr)
usr.gld -= 20
else
src <<output("You need 20 gold","comwindow")
if("Nothing")
..()
Problem description: I get an error when trying to use the npc.