here's my problems:
script-1
Spoiler
ERROR:
SCRIPT:
1
2
3
4
2
3
4
Player died LUA ERROR: sys/lua/autorun/exp.lua:436: attempt to perform arithmetic on field '?' (a nil value) -> sys/lua/autorun/exp.lua:436: in function <sys/lua/autorun/exp.lua:432> -> in Lua hook 'die', params: 1, 0, 0, 451, 164
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
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
--THE ADDHOOK BELOW IS LINE NUMBER "431" addhook("die", "dieded") function dieded(id, vid, wep, x, y) 	if vid ~= nil then 		if id ~= nil then 			if id ~= vid then 				cs_exp[vid]=cs_exp[vid]-10 				cs_exp[id]=cs_exp[id]+5 -- 			msg(player(id, "name").." killed "..player(vid, "name")"!") 				msg2(vid,"\169255255000[Server]: \169255000000You got killed by "..player(id, "name").." and lost 10 EXP + 1000$!") 				msg2(id,"\169255255000[Server]: \169000255000You killed "..player(vid, "name").." and gained 5 EXP + 500$!") 				rp_killer[id]=true 				rp_money[id]=rp_money[id]+200 				updatehud(id) 				if rp_money[vid]>=1000 then 				rp_money[vid]=rp_money[vid]-1000 				updatehud(vid) 				end 					if rp_criminal[id]==true then 					rp_money[id]=rp_money[id]+2000 					cs_exp[id]=cs_exp[id]+5 					msg2(id,"\169255255000[Server]: \169000255000Criminal bonus 2000$ and 10 EXP!") 					end 					if rp_criminal[vid]==true and rp_police[id]== true then 					rp_money[id]=rp_money[id]+5000 					cs_exp[id]=cs_exp[id]+20 					msg2(id,"\169255255000[Server]: \169000255000You've killed a criminal, you won 5000$ and 20 EXP!") 					end 					if rp_criminal[vid]==true then 					cs_exp[vid]=cs_exp[vid]-40 					msg2(vid,"\169255255000[Server]: \169255000000You've been killed and lost 10,000$ and 40 EXP!") 					if rp_money[vid]>=10000 then 					rp_money[vid]=rp_money[vid]-10000 					updatehud(vid) 					end 					end 			end 		end 	end end
script-2
Spoiler
ERROR:
(when getting hurt by env_hurt)
SCRIPT:
(when getting hurt by env_hurt)
1
2
3
2
3
LUA ERROR: sys/lua/autorun/showdamage.lua:21: attempt to perform arithmetic on field '?' (a nil value) -> sys/lua/autorun/showdamage.lua:21: in function <sys/lua/autorun/showdamage.lua:19> -> in Lua hook 'hit', params: 1, 0, 239, 15, 0, 15
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
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
-------------------------------------------- -- Show Damage Script by FastLine Advance -------------------------------------------- sd = {} function initArray(m) 	local array = {} 	for i = 1, m do 		array[i]=0 	end 	return array end sd.damage = initArray(32) sd.showtimer = initArray(32) addhook('hit','sd.hit') function sd.hit(id,src,wpn,hp) 	if hp > 0 then 		sd.damage[src] = sd.damage[src] + hp 		sd.show(src) 		sd.showtimer[src] = 10 	end end function sd.show(id) parse('hudtxt2 '..id..' 0 "©255255255-'..sd.damage[id]..' HP" 300 200 -1') end addhook('ms100','sd.check') function sd.check() 	for i = 1,32 do 		if player(i,'exists') then 			if sd.showtimer[i] > 0 then 				sd.showtimer[i] = sd.showtimer[i] - 1 			else 				sd.damage[i] = 0 				parse('hudtxt2 '..i..' 0 "" 320 240 0') 			end 		end 	end end