Arrays and Tables

Ok i have original gmod now so won’t have problems with my wire…
But I can’t find any tut about arrays and tables. Can some1 explain me what are they for and how do they work?

Arrays store multiple values under number indexes. For instance
Array[1,number] = 12
Now 1 holds 12.
Array[2,number] = 118
2 holds 118.

To retrive it you use Array[Index,number] eg.
print(Array[2,number]) will print 118.

You can use dynamic indexes too.



Array[1,number] = 12
Array[2,number] = 118
Array[3,number] = 9000
Array[4,number] = 42
Array[5,number] = 1337

for (Index = 1,5) {
    print(Array[Index,number])
}



Tables are the same, but the index is a string like “lol” “Whosdr” “renamon” “stars” ect.

wht are dynamic indexes…?