Forum

> > CS2D > Scripts > stupid lua-initArray bug
Forums overviewCS2D overview Scripts overviewLog in to reply

English stupid lua-initArray bug

3 replies
To the start Previous 1 Next To the start

old stupid lua-initArray bug

Sudden Death
User Off Offline

Quote
Hello try make something for my friend and lua don't like me:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function initArray(m)
local array = {}
for id = 1, m do
array[id]=0
end
return array
end

x=initArray(32)

addhook("spawn","iii")
function iii()
if x[id]>=1 then -- here it's have problem :/ it's don't like ">="??
x[id]=x[id]-1
end
if x[id]==0 then
menu(id,"Imperator,Yes,No")
end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview