Cunning fox Posted January 8, 2017 Share Posted January 8, 2017 (edited) I've got a mod, that adds new amulet. But I have some troubly with it. When I exit game, it crashes witn 16: attempt to index field 'combat' (a nil value) And I no longer able to start server. I realy can't understand why is it crashing... My prefab is here: http://pastebin.com/MAR2X60z I realy need your help. Thank you for taking your time to solve my problem! Edited January 8, 2017 by makar5000 1 Link to comment Share on other sites More sharing options...
zUsername Posted January 8, 2017 Share Posted January 8, 2017 @makar5000 local function onequip(inst, owner) owner.AnimState:OverrideSymbol("swap_body", "torso_myamulets", "skullamulet") if inst.components.fueled then inst.components.fueled:StartConsuming() end if owner.components.combat then owner.components.combat.damagemultiplier = 1+.5 end if owner.components.health then owner.components.health:SetAbsorptionAmount(-(TUNING.WATHGRITHR_ABSORPTION*120)) end end local function onunequip(inst, owner) owner.AnimState:ClearOverrideSymbol("swap_body") if inst.components.fueled then inst.components.fueled:StopConsuming() end if owner.components.combat then owner.components.combat.damagemultiplier = 1 end if owner.components.health then owner.components.health:SetAbsorptionAmount(0) end end Link to comment Share on other sites More sharing options...
Recommended Posts
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