I am making a dynamically learning bee breeding program using CC and openP and having some issues trying to get one of my nested tables to work correctly. I am wanting my table to look like something below
{result= {1={species1,species2},2={species1,species2}}}
the reason for the 1= and 2= is to have all the different combos for the same bee listed such as common which has many. (and not have multiple "results" as common as that will break what I am trying to do as well)
currently my table has came out in many different wrong ways but its always either looking like the below
{result={1={species1,species2,species3,species4,...}}}
or
{result={species1,species2}} <---- missing all the other combos and just picks two to stay.
in spoiler below is current code I am working with.
Spoiler
link to pastebin of code, http://pastebin.com/tUN12yxjany advice or better reading material (read quite a bit of the LUA reference manual) would be a great help to me.
p.s. yes I know someone already created a program to do this but I dont want to use it for two reasons.
1. its a static list and will not adapt as things change.
2. most importantly, I think using the whole of someone else's code takes the fun and challenge out of it (though I do read a lot of them to try and learn things)












