Defenition of products array in Script 1 (exportScript)
var products = new ExportInventory[3];
Defenition of goodsList in Script 2 (G)
static var goodsList = new Dictionary.<int,Goods>();
Script 3, where the problem is
var i : int = 0;
for(p in G.goodsList.Values){
exportScript.products*.goodId = p.goodId;*
i++;
}
Can anyone tell me why all exportScript.products_.goodId entries gets set to the last value in the G.goodsList.Values_
p.goodId is different on each step in the loop as it should.