about tables

hello, is it possible to put 3 numbers in a table, say for a pos or something like this?




postable = {}
postable[1]= (111,111,222)
postable[2]= (222,111,333)

local r = math.random(2)
local pos = postable[r]

or is it impossible? or would i have to do this?




postableX = {}
postableX[1]= 111
postableX[2]= 222

postableY = {}
postableY[1]= 111
postableY[2]= 111

postableZ = {}
postableZ[1]= 222
postableZ[2]= 333

local r = math.random(2)

local posX= postableX[r]
local posY= postableY[r]
local posZ= postableZ[r]

because i need to randomly select a position so would i do it that way?

Yes, that is very possible. You must make a subtable like so:
[lua]postable = {}
postable[1] = { 111, 111 }
postable[2] = { 222, 111 }

local r = math.random( 2 )
local posX = postable[r][1]
local posY = postable[r][2][/lua]

Edit: Now that you’ve changed your post to use 3 coordinates, use Dave_Parker’s method.

[lua]postable = {}
postable[1] = Vector(111,222,333)
postable[2] = Vector(444,555,666)

local r = table.Random(postable)
[/lua]
Or what Overv posted.