Jump to content

Modded Character Support - Unknown Crash


Recommended Posts

Sorry about that, @DarkXero. The client crashes and that is the client's report. Server disconnects client. Server continues running. Same version as I save test builds in a different folder, plus this was originally reported with the client's friend and his server. However, the code causes the player to gain armor and to automatically equip it when someone logs in. If you need it, I can give you any prefab file you need, such as winston.lua which is the player, or skarmorstalwartplate.lua if you need the armor's code.

Sorry about the lack of info. I'm usually better about that. >.>

Link to comment
Share on other sites

@NyctoDarkMatter

maybe it has to deal with this

	inst._OnNewSpawn = inst.OnNewSpawn
    inst.OnNewSpawn = function()
		if inst.components.inventory ~= nil then
			inst.components.inventory.ignoresound = true
			local itemArmor = SpawnPrefab("skarmorstalwartplate")
			inst.components.inventory.activeitem = itemArmor
			inst.components.inventory:EquipActiveItem()
			inst.components.inventory:SetActiveItem(nil)
			inst.components.inventory.ignoresound = false
		end
	end

comment it out and try again.

 

Use

local function OnNewSpawn(inst)
	local itemArmor = SpawnPrefab("skarmorstalwartplate")
	inst.components.inventory:Equip(itemArmor)
end

local function master_postinit(inst)
	inst.OnNewSpawn = OnNewSpawn
end

to try to start with the equipped armor instead.

Link to comment
Share on other sites

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
 Share

×
  • Create New...