Shoot I messed up the code a bit this is what I meant, Ill explain more first:
Im making a program to load objects onto a truck in the best way possible. The user enters the objects in the order they wish and the program will then load them. The user inputs the amount of the item, the width, the length, the height and the load number. These are stored in their respective variables and then dimed into an array:
DIM LoadNumber#(4)
LoadNumber#(1)=ItemAmount#
LoadNumber#(2)=ItemWidth#
LoadNumber#(3)=ItemHeight#
LoadNumber#(4)=ItemLength#
Then the LoadNumber# is increased by 1 so that array isn't overwritten:
INC LoadNumber#,1
So, if they input 10 Items, with 5 Width, 5 Length, and 15 Height, and an order or load number of 1, the array would then dim:
DIM 1(4)
1(1)=10
1(2)=5
1(3)=15
1(4)=5
I then am using two loops to create the objects with their dimensions, like so:
FOR A = 1 TO TotalTypes#
FOR B = 1 TO A(1)
IF OBJECT EXIST(B)=0 THEN MAKE OBJECT BOX B,A(2),A(3),A(4)
NEXT I
NEXT I
TotalTypes# equals the total amount of types of items, so if you had 5 chairs, 7 tables and 3 skids, the TotalTypes# variable would be set to 3.
So this system would in theory work in my head but it doesnt. My first example was bad, I think I got it all covered in this loop. Now you see that I need to have A(1) in there because A will change, it starts at 1 which is the 1st load the user specified, for example we specified 10 objects 10x5x15, so it'd make 10 of those, then A would change to 2 and it would check what the dimensions of load 2 are and make however many there are of them, and so on until all objects are created.
Sorry for the confusion, thanks for trying.