roriscrave
Advanced OT User
- Joined
- Dec 7, 2011
- Messages
- 1,188
- Solutions
- 34
- Reaction score
- 200
Hi, im using tfs 1.2 for 8.6 and found this bug:
I made one script, when a player kill X monster, player gain Y storage:
But have one bug, if you kill the target with only 1 hit, it will generate this error:
But if you kill with more than 1 hit, the script runs normal, no error.
The error is when the target dies in only 1 hit, it does not generate the "killer", why?
I made one script, when a player kill X monster, player gain Y storage:
Lua:
function onDeath(creature, corpse, killer, mostDamageKiller, lastHitUnjustified, mostDamageUnjustified)
if killer:isPlayer() then
killer:setStorageValue(191912, 1)
end
return true
end
But have one bug, if you kill the target with only 1 hit, it will generate this error:
Code:
/scripts/tests.lua:2: attempt to index local 'killer' (a nil value
But if you kill with more than 1 hit, the script runs normal, no error.
The error is when the target dies in only 1 hit, it does not generate the "killer", why?