When I try to use 【replica.Container: HasItemWithTag (" Musha_forge_fuel ", 1)】
The game crashed.
Also, When I try to use [doer.replica.inventory:HasItemWithTag("Musha_forge_fuel", 1)]
The game crashed.
The code like this
local function FindForge(inst)
local ForgeTAG = {"musha_forge"}
local Forge = FindEntity(inst, 6, nil, ForgeTAG)
return Forge and not Forge:HasTag("CAN_FORGE")
end
AddComponentAction(
"INVENTORY",
"inventoryitem",
function(inst, doer, actions, right)
if FindForge(inst) and inst.replica.inventoryitem and inst.replica.equippable and inst:HasTag("musha_armor_forge") and doer.replica.inventory:HasItemWithTag("Musha_forge_fuel", 1) then
local item = doer.replica.inventory:GetEquippedItem(EQUIPSLOTS.BODY)
if item and item.replica.container and not item.replica.container:HasItemWithTag("Musha_forge_fuel", 1) then
table.insert(actions, ACTIONS.MUSHA_ARMOR_FORGE)
elseif not item then
table.insert(actions, ACTIONS.MUSHA_ARMOR_FORGE)
end
end
end
)
This problem occurs when a player has a backpack.
use 【doer.replica.inventory:HasItemWithTag(tag, amount) or inst.replica.container:HasItemWithTag(tag, amount】
hmm...Did you need more?
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 accountSign in
Already have an account? Sign in here.
Sign In Now