LUA ERROR: sys/lua/respawndelay.txt:32: bad argument #2 to 'random' (interval is empty)when im killed and when im join team it says
LUA ERROR: sys/lua/respawndelay.txt:32: attempt to get length of field '?' (a nil value)how to fix it?? here's my code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
-- Respawn Delay by Rian2_idih if tonumber(game("sv_gm"))~=0 then respawn = 5 parse("mp_respawndelay "..respawn) pos = { 	[1] = {}, 	[2] = {}, } function definepos() 	for x,y in pairs(entitylist(1)) do 		table.insert(pos[1],{x,y}) 	end 	for x,y in pairs(entitylist(2)) do 		table.insert(pos[2],{x,y}) 	end end definepos() addhook("team","startteam") function startteam(id) 	spawndelay(id) end addhook("die","spawndelay") function spawndelay(id) 	x = pos[player(id,"team")][math.random(1,#pos[player(id,"team")])][1] 	y = pos[player(id,"team")][math.random(1,#pos[player(id,"team")])][2] 	t = 1000*respawn 	timer(t,"parse","spawnplayer "..id.." "..(x*32).." "..(y*32)) end end
x = pos[player(id,"team")][math.random(1,#pos[player(id,"team")])][1]