ID:1900621
 
(See the best response by Kaiochao.)
Im trying to make a system where the recipes is based on 3 things but i dont care the order of them, just that the 3 things are in it to make the end result. Atm its just selecting the item via a drop down menu and setting the var to w/e you pick for each part then checks the order and then produces the results.

Best response
If you convert the things to something immutable (such as their object types, or a number, or a string), you can check the length of a list subtraction:
var recipe[] = // the items required (types)
var items[] = // the items you have (converted to types)

if(items.len != recipe.len)
// failure
return

var leftover[] = recipe - items

if(leftover.len)
// failure
else
// success

This won't work if you have a stacking system, but I (and many many others) have straightforward solutions for crafting with item stacks.
So how would I make each of the recipes?
In response to Mastergamerx
I would assume program them into whatever crafting solution checker you've written.
i mean var recipe[]=???? i dont know how to code it or what to put there exactly
Let's say each recipe is represented by an associative list, such as list(/obj/item/food/bun, /obj/item/food/flour=1, /obj/item/food/cinnamon=1, /obj/item/food/egg=2), and the first item in the list is the product. For robustness, if there's no associated value we'll call it a 1.

Let's also say that your inventory system uses stacking, so each of these objects has a count var. (I can't imagine wanting to do a crafting system without stacking.) Here's how I'd check:

mob/proc/CraftRecipe(list/recipe)
var/t, n
var/obj/item/O
var/list/found = list()
for(t in recipe)
if(t == recipe[1]) continue
n = recipe[t] || 1 // n is the count
O = locate(t) in src
if(O.count < n) return 0
found[O] = n
for(O in found)
O.AddCount(-n) // stacking routine: update O's count and info
t = recipe[1]
n = recipe[t] || 1
O = locate(t) in src
if(!O)
O = new t(src)
O.AddCount(n-O.count)
else O.AddCount(n)
return 1

If you want this to be extensible, hard-coded types probably aren't ideal. In that case I'd go with something like a name var instead, and you'd have to use something besides locate() to find the item.