Multidimensional arrays

I have been struggling with this problem for over 5 hours right now, and I hope that one of you guys can help me out with this.

My aim is to have a multidimensional array, that “sorts” people into categories and each category has a different member count.
So for example, I’d want it to look like this:
people[“generic”][#];
And the # would be the number of a member in that category. Each member is supposedly a Loader class.
So at the start, the array is empty and I want to add more people. I’ve got the data stored as peopleGroups[] and peopleCount[] (this isn’t the real way I have it, so don’t suggest me morphing those two into one array or something. I’m just simplifying all this.).
So then, I would go like…


for(var i:int = 0; i<peopleGroups.length; i++)
{
for(var j:int = 0; j<peopleCount*; j++)
{
people[peopleGroups*][j] = new Loader();
}
}

So in my opinion that’d be correct. Well, I guess I’m not.
TypeError: Error #1010: A term is undefined and has no properties.
I used trace statements to check out which line is it, and it turned out to be

people[peopleGroups*][j] = new Loader();

.

I checked the definition of the people array.


private var people:Array = new Array(new Array());

Note: It’s all the same class, so the private / public property wouldn’t change anything.

Gah. Well, I wanted to fix this of course. So I just tried tracing people[0][0]. Same error as before. So since it seems I can’t access anything of the class, whether it be using a String for the first array location, or an int, no matter.

So does anyone have suggestions for this? I would be very thankful for any help towards fixing this error and making the above loop and normal referrencing to that array possible.