This is in the hook.lua to make health bar system over players heads, it give a error to console but it works like a charm.. tho the errors are annoying cuz i cant read anything else then the error.
addhook("ms100", "HEALTHbarsms100") function HEALTHbarsms100() 	for _, id in ipairs(player(0, 'table')) do 	if 	PLAYERS[id].tmp.equip[3].monstermessage >= 35 then 			hudtxt2(id,15, "", '255255255', 565, 389-CONFIG.PIXELS, 1) 			hudtxt2(id,16, "", '255255255', 565, 392-CONFIG.PIXELS, 1) 		else 			PLAYERS[id].tmp.equip[3].monstermessage = PLAYERS[id].tmp.equip[3].monstermessage + 1 		end 		if PLAYERS[id] and PLAYERS[id].tmp then 		if PLAYERS[id].x and PLAYERS[id].y then 			if PLAYERS[id].HP > 80 then 				freeimage(PLAYERS[id].hpimage) 				PLAYERS[id].hpimage = image("gfx/weiwen/100hp.png", 0, 1, id+200) 			elseif PLAYERS[id].HP > 60 then 				freeimage(PLAYERS[id].hpimage) 				PLAYERS[id].hpimage = image("gfx/weiwen/80hp.png", 0, 1, id+200) 			elseif PLAYERS[id].HP > 40 then 				freeimage(PLAYERS[id].hpimage) 				PLAYERS[id].hpimage = image("gfx/weiwen/60hp.png", 0, 1, id+200) 			elseif PLAYERS[id].HP > 20 then 				freeimage(PLAYERS[id].hpimage) 				PLAYERS[id].hpimage = image("gfx/weiwen/40hp.png", 0, 1, id+200) 			else 				freeimage(PLAYERS[id].hpimage) 				PLAYERS[id].hpimage = image("gfx/weiwen/20hp.png", 0, 1, id+200) 			end 		end 		else 			if PLAYERS[id].hpimage then 				freeimage(PLAYERS[id].hpimage) 			end 		end 	end end
This is the error :
LUA ERROR: sys/lua/cs2dtibia/hooks.lua:329 attempt to index field '?' (a nil value)
And line 329 from above is :
if 	PLAYERS[id].tmp.equip[3].monstermessage >= 35 then
All i've found out is that a value is missing and i dont know witch one it is (Pm or comment and ill post the file)