ID:143139
 
Code:
    proc/grind1()
var/list/I = usr.contents
var/J = input("What would you like to grind together?","Grinding") in I + "Nothing"
if(J=="Nothing")
src<<"Ok, you will combine nothing."
if(J=="Red Herb")
if(locate(/obj/usableitems/redherb) in contents)
usr<<"You take the herb and grind it up into a fine powder and place it into a bag."
new/obj/usableitems/redherbpowder(usr)
del /obj/usableitems/redherb
else
src << "You don't have a red herb, its bugged."
if(J=="Blue Herb")
if(locate(/obj/usableitems/blueherb) in contents)
usr<<"You take the herb and grind it up into a fine powder and place it into a bag."
new/obj/usableitems/redherbpowder(usr)
del /obj/usableitems/redherb
else
src << "You don't have a blue herb, its bugged."
if(J=="Green Herb")
if(locate(/obj/usableitems/greenherb) in contents)
src << "You take the herb and grind it up into a fine powder and place it into a bag."
new/obj/usableitems/greenherbpowder(usr)
del /obj/usableitems/greenherb


Problem description:
Well, I want to give the user the power to grind down herbs to later mix them together into stuff and I tried this code, but it didn't work. Someone help?
Your if() statements need to be using istype() to determine the type of J. Then, delete J if it's something you can grind. Also: the locate() is unneeded.