• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Tfs 1.0 onKill error.

A

Alw

Guest
Hi, I'm currently scripting a killcounter for a task. I'm using tfs 1.0 if that wasn't clear hehe..
Well the problem is that i get this error.
Attempt to index local 'target' <a number value>

Well i really don't know what to do. Here is where i use target.

Code:
function onKill(creature, target)
    if target:isPlayer() or target:getMaster() then
        return true
    end
end

Thanks in advance.
Regards Alw
 
The parameters cid and target are creatureids in TFS 1.0, not userdata.
Code:
local target = Creature(target)
 
Back
Top