You can do
1
2
3
2
3
a = "boi" print("mah "..a) mah boi
a = "boi" print("mah "..a) mah boi
ci={}		//initialize array ci[0]=...			//set value at index 0 (same as ci0=...) ci[1]=... ... ci[9]=... ci[sel]			//get value at index sel (that's what you tried with ci..sel)
function initArray2(f,v) 	local cmd={} 	for c=1,f do 		cmd[c]=v 	end 	return cmd end
function doublearray(m,n,k) 	local a, x, y = {} 	for x = 0, m do a[x] = {} 		for y = 0, n do 			a[x][y] = k 		end 	end 	return(a) end
function get_ci(n) return _G["ci"..n] end -- Test code assert(get_ci(1) == ci1) -- True
a = doublearray(2,2,{1}) a[1][1][1] = 3 assert(a[1][1][2] == a[1][1][1])