Ah I see. As to the knowing the indexs already yes I do know them in the beginning but the user has the ability to change them, Im working on a vehicle plugin and each vehicle is given properties, the properties are then stored in a multidminsional array (The first level is the object number, the second level is an entry number (dont ask) and the third index is the entry's properties. I know I should be using types but this system is working exactly how I want it too. What I need to do is figure out how many entries there are for each vehicle, and how many vehicles there are total. I could create another array containing this information but if I can use a command to find how many there are I'd prefer it.
<edit>
Explaining a little more on the system:
To add an entry the programmer calls the AddEntry function. An entry is basically a door to the vehicle; where the user can get into the vehicle. So the user could create, for example for a car, two entries. One for the driver seat and one for the passenger. The programmer specified the object the entry's should be added to, an entry ID number for later use, and some other properties. These are stored like so:
Vehicle(Parent, Entry, 10)
Parent is the parent object (so if object 2 was the car, the parent would be 2.). Entry is the entry id, this allows for multiple entries to be created per car, and also allows for multiple entries with the same number to be used without affecting each other. The third index holds about 10 slots for information about the entry (who can enter, any animations to be played, how close the user has to be to the entry point to enter, etc.)
Another function allows the user to find the Dynamic's (a Dynamic is a user-controlled object that can/will at some point occupy an entry to control the vehicle) Parent. The Dynamic's Parent is simply what objec tthe Dynamic is being controlled by. So, if the Dynamic is in a vehicle the Dynamic Parent returned is the Object Number of the vehicle the user is in. If the user isn't inside a vehicle, the Dynamic's object number is returned. This is useful for switching between controlling the dynamic and the car.
What I need to do for this function is use a For/Next loop to check each vehicle's Entry Slot to see if the Dynamic is occupying it. If so I can return the Vehicle Number the Dynamic is occupying.
The problem lies here, I need to know how many Vehicles and Entries have been created, so I can modify the For/Next loop to repeat that many times.
Any help appretiated,
- RUC'