1
LUA ERROR: sys/lua/new 2.lua:18: attempt to perform arithmetic on field '?' (a nil value)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
-- Scope position by Rian2_idih function array(id,di) 	local lol = {} 	for dih = 1,id do 		lol[dih] = di 	end 	return lol end posx = array(32,0) posy = array(32,0) positionx = array(32,0) positiony = array(32,0) attacks = array(32,0) snipers = {31,33,34,35,36,37} function sethud(id) 	parse("hudtxt2 "..id.." 38 \""..posx[id].."\" "..(positionx[id]-20).." "..positiony[id][2]) 	parse("hudtxt2 "..id.." 39 \""..posy[id].."\" "..positionx[id].." "..(positiony[id][2]-20)) end addhook("always","chk") function chk() 	for _, id in ipairs(player(0,"table")) do 		if attacks[id]>0 then 			reqcld(id,0) 			reqcld(id,2) 			timer(75,"sethud",id) 		end 	end end addhook("clientdata","set") function set(id,mode,x,y) 	if mode==0 then 		positionx[id]=x 		positiony[id]=y 	end 	if mode==2 then 		posx[id]=x 		posy[id]=y 	end end addhook("attack2","weaponmode") function weaponmode(id,mode) 	weapon=player(id,"weapontype") 	for _, l in ipairs(snipers) do 		if weapon==l then 			attacks[id]=mode 		end 	end end