ID:1235458
 
Code:
mob/var/Equipment[1][5]

or

mob/var/Equipment[5]


Problem description:

Which would be better to use for an Equipment System? 1 list, with 5 elements or 5 lists?
This isn't how this works.

mob/var/Equipment[5]

This creates a list with a len of 5 - it has 5 elements, all set to null. If you do Equipment[0], then it initializes a new list with an undefined len, which is just the same as doing Equipment = list().

mob/var/Equipment[1][5]

I haven't used things like this very much, but it is to my understanding that this initializes a list with a len of 1 that is associated with a list with a len of 5 - much like doing this:
mob/var/Equipment = list("1" = list(1,2,3,4,5))
In response to Albro1
I was doing (example below) to assign objects to the index number.
Equipment[1][1]=new/obj/hair
Equipment[1][2]=new/obj/shirt
....
....
....


Then for adding overlays... (I didn't test this yet, I'm assuming it'll work.)
mob/verb/Add()
for(var/i in 1 to 5)
usr.overlays += Equipment[1][i]


Would this be a good way to do it? Or is there a better way I could do it?
If you aren't going to ever use Equipment[2][i], then there's no point in having that list association.

Just do Equipment[5], and then you can simply do Equipment[i].
Okay, thanks. Like I said, I don't really use those much.
In my opinion just go with a basic equipment single list that each thung holds a direct reference

My equip list uses 1 list with 10 or so elements
Each element has the name of the "slot, with a link to the item that is in contents basic and to the point