1
2
3
4
5
6
2
3
4
5
6
function hit(victim_id, attacker_id, weapon, hpdmg) 	if player(attacker_id, 'team') == player(victim_id, 'team') then 		return 1 	end 	damage[attacker_id][victim_id] = damage[attacker_id][victim_id] + hpdmg end
Sometimes this happens, how to fix?
[18:40:21] LUA ERROR: sys/lua/server.lua:4531: attempt to index field '?' (a nil value)
[18:40:21] -> sys/lua/server.lua:4531: in function <sys/lua/server.lua:4527>
[18:40:21] -> in Lua hook 'hit', params: 8, 0, 0, 78, 0, 127, 0
[18:47:40] LUA ERROR: sys/lua/server.lua:4531: attempt to index field '?' (a nil value)
[18:47:40] -> sys/lua/server.lua:4531: in function <sys/lua/server.lua:4527>
[18:47:40] -> in Lua hook 'hit', params: 8, 0, 0, 80, 0, 80, 0
[18:58:08] LUA ERROR: sys/lua/server.lua:4531: attempt to index field '?' (a nil value)
[18:58:08] -> sys/lua/server.lua:4531: in function <sys/lua/server.lua:4527>
[18:58:08] -> in Lua hook 'hit', params: 4, 0, 0, 100, 100, 323, 0