put all your data in 1 array
put all your data in 1 data structure (ds_list)
put all your arrays in another array.
i'm not sure what your trying to accomplish.for(k=1;k<=3;k+=1) { for(i=1;i<=data_width;i+=1) { for(ii=1;ii<=data_height;ii+=1) { if data_all[k,data[i,ii]]== data_needed { scr_data(k,i,ii); } } } }
Can't make it work like you have it cause different data groups have different widths, heights, and names. But I think if I could somehow store the all the different arrays inside another array, I could make it work something like that.
I could possibly put all the data in one structure, but that would be inefficient because not all data types need to be accessed at once, just sometimes. And I would need to add a flag, and a check for what kind of data is being read since it would be all bunched together.
Thanks for the ideas everyone.
[EDIT]
Okay, I was able to get it to work using the following:
type = "data1"
type_width = data1_width
type_height = data1_height
data_needed = data1_needed
for(j=1;j<=3;j+=1)
{
for(i=1;i<=type_width;i+=1)
{
for(ii=1;ii<=type_height;ii+=1)
{
if variable_local_array2_get(type,i,ii) == data_needed
{
scr_data(type,i,ii);
}
}
}
switch j
{
case 1:
{
type = "data2"
type_width = data2_width
type_height = data2_height
data_needed = data2_needed
break;
}
case 2:
{
type = "data3"
type_width = data3_width
type_height = data3_height
data_needed = data3_needed
break;
}
}
}I realize that I've pretty much circumvented any "easy" solution, but it's still worth it seeing as my actual code is much bigger. If anyone knows a more optimized way of accomplishing the same thing, I'd love to hear it. (This would all be much easier with a 3d array.)



Find content
Not Telling
