Heres the full script:
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook("die","ondie") function ondie(victim,killer,x,y) 	local tx = player(victim,"tilex") 	local ty = player(victim,"tiley") 	if player(id, 'health') > 0 then -- Line 11 	spawnitem(1337, player(victim, "tilex"), player(victim, "tiley"), money) 	end end
But in console, the error shows this:
1
LUA ERROR: maps/cs_assault.lua:11: bad argument #1 to 'player' (number expected, got nil)
Does anyone know how to fix this?