Sign in to follow this  
NyctoDarkMatter

Modded Character Support - Unknown Crash

Recommended Posts

DarkXero    2887

@NyctoDarkMatter

Who crashed? The server? The first client? The second client?

It's just by logging in? No fancy armor equipped or anything on the first guy? The second one logs for the first time?

You sure that both of you have the same mod without code differences?

Share this post


Link to post
Share on other sites

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. >.>

Share this post


Link to post
Share on other sites
DarkXero    2887

@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.

Share this post


Link to post
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
Sign in to follow this