Forum

> > CS2D > Scripts > xcounter[lcounter[id]] is that possible?
Forums overviewCS2D overview Scripts overviewLog in to reply

English xcounter[lcounter[id]] is that possible?

7 replies
To the start Previous 1 Next To the start

old xcounter[lcounter[id]] is that possible?

loldlold123
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
function initArray(m)
	local array = {}
	for i = 1, m do
		array[i]=0
	end
	return array
end

xcounter=initArray(32)
lcounter=initArray(32)

if xcounter[lcounter[id]]==1 then

is that possbile
edited 1×, last 20.07.11 09:49:07 pm

old Re: xcounter[lcounter[id]] is that possible?

EngiN33R
Moderator Off Offline

Quote
Of course it's possible. You can make it even
1
2
3
4
5
t1={{1,{1,{1,{1,1}}}},{1,{1,{1,{1,1}}}}}
t2={{2,{2,{2,{2,2}}}},{2,{2,{2,{2,2}}}}}
t3={{3,{3,{3,{3,3}}}},{3,{3,{3,{3,3}}}}}

if (t1[t2[t3[1][1][1][1][1]]]==1) then print("olol") end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview