Jump to content

There is an error on line 59 in pigelitefighter.lua.


nknkk1
  • Fixed

local function OnAttacked(inst, data)
    local attacker = data ~= nil and data.attacker or nil
    if attacker ~= nil and inst.components.follower ~= nil and inst.components.follower:GetLeader() == attacker then
        PreventTargetingOnAttacked(inst, attacker, "player")
        inst.components.follower:StopFollowing()
    elseif attacker.components.combat ~= nil and inst.components.combat.target == nil then
        inst.components.combat:SetTarget(attacker)
    end
end
--This code segment needs optimization.


Steps to Reproduce

[07:42:57]: [string "scripts/prefabs/pigelitefighter.lua"]:59: attempt to index local 'attacker' (a nil value)
LUA ERROR stack traceback:
    scripts/prefabs/pigelitefighter.lua:59 in (local) fn (Lua) <54-62>

  • Haha 1



User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...