Jump to content

Character Crashing [ I found the cause but no solution ]


Recommended Posts

So I am having trouble with a character on a caves world.

He crashes when he spawns from the Florid Portal in a caves world.
The crash report is attached, pardon the poor picture it kept crashing if I did anything more.

The report comes up if I move at all when I spawn and then the game usually crashes.
I am able to play normal if my character slides into the darkness, dies, then I relaunch the server.

I found the code that breaks the game:

It was my OnEnterDark function.
 

This is what the function did 

--local function OnEnterDark(inst)
	--if inst.LightWatcher:GetLightValue() <= 1 then
		--inst.components.sanity.current = 0
		--inst.components.hunger.current = inst.components.hunger.current / 2
	--end
--end

And in the master_postinit

--inst:ListenForEvent("enterdark", OnEnterDark)

All this code is in my character file.

Again, this crash happens on spawned character that move, that haven't died, in a caves world.
 

scruffy crash.png

Link to comment
Share on other sites

Could this be a crash because of a bearger is in the world that I don't know?

Well the problem had to do when I c_despawn() my character or spawn in for the first time. If I log into the same world with another character it is fine.

Something appears to be wrong with my character.

Edited by SomeoneStrange
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...