Jump to content

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

Ok this is the full code, I currently disabled the function that I don't believe works.

modmain.lua

scruffy.lua

 

The code that I am referencing is from scruffy.lua

Edited by SomeoneStrange
  • Developer
17 hours ago, SomeoneStrange said:

Ok this is the full code, I currently disabled the function that I don't believe works.

modmain.lua

scruffy.lua

 

The code that I am referencing is from scruffy.lua

taking a glance at your code, its not even your mod try just loading your mod and see if you get the same crash.

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

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
×
  • Create New...