I need to make 3d array( a[32][20][20]) but can not.
Please,help
mmpmap = {} mmpmap[32] = {} mmpmap[32][20] = {} mmpmap[32][20][20]=1 pl=4 x=4 y=6 mmpmap[pl][x][y]=5		--error
function table.array(v, ...) 	local t = {} 	if arg[2] then 		v = table.array(v,table.unpack(arg,2)) 	end 	for i=1,arg[1] do 		t[i]=v 	end 	return t end
table={} function table.array(v, ...) local t = {} if arg[2] then v = table.array(v,table.unpack(arg,2)) end for i=1,arg[1] do t[i]=v end return t end mmpmap = table.array(0,32,20,20)
function threedarray(v,d1,d2,d3) 	local t = {} 	for i=1, d1 do 		t[i] = {} 		for j=1,d2 do 			t[i][j] = {} 			for k=1,d3 do 				t[i][j][k] = v 			end 		end 	end 	return t end
function threedarray(v,d1,d2,d3) 	local t = {} 	for i=1, d1 do 		t[i] = {} 		for j=1,d2 do 			t[i][j] = {} 			for k=1,d3 do 				t[i][j][k] = v 			end 		end 	end 	return t
a={} a[23]={} a[23][42]={} a[23][42][77]="lol" if type(a[23])=="table") and type(a[23][42])=="table") and type(a[23][42][77])=="table") and a[23][42][77]~=nil then 	print("it exists!") else 	print("nope try again!") end
my_3d_array = {{{}}}