Jump to content

Dear KLEI, I guess that I found a mistake in "inventory_classified.lua"


Recommended Posts

at first, it is hard to decide proper bbs category  for this.

 

so, I write it here. If wrong, please notice me.

 

 

Anyway, now I am making mod for equipment. 

 

But it not working on Client. So, I analyze code.

 

as a result, I guess a usage of function "PushNewActiveItem" in function  "EquipActionItem" is missing argument , "item"

 

It means...

 

local function EquipActionItem(inst, item)

    if not IsBusy(inst) and inst._activeitem == item then

        local eslot = item.replica.equippable:EquipSlot()

        local takeequip = SlotEquip(inst:GetEquippedItem(eslot), eslot)

        local giveitem = SlotEquip(inst._activeitem, eslot)

        if takeequip ~= nil then

            PushUnequip(inst, takeequip)

        end

        PushNewActiveItem(inst)  ------------  FIX HERE to PushNewActiveItem(inst, item)

        PushEquip(inst, giveitem)

        SendRPCToServer(RPC.EquipActionItem)

    end

end

 

 

May be I am wrong. But anyway,  replica.inventory:EquipActionItem()  is not working. 

 

please check and answer me.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...