Jump to content

[Mod Help] Custom Character Crashes On Death


BillBobJoy

Recommended Posts

@Cheerio

 

I have a mod that makes a custom character and when he dies and the the score screen is about to pop up I get a crash with this error report.

 

...steamapps/common/dont_starve/data/scripts/update.lua:7:calling 'SetActiveAreaCenterpoint' on bad self (number expected, got nil)
LUA ERROR stack traceback:
=[C] in function 'SetActiveAreaCenterpoint'
C:/Program Files (x84)/Steam/steamapps/common/dont_starve/data/scripts/update.lua(7,1)
 
when I looked at the update script it seemed like it was the part of the code for keeping the collision mask on point but when the character dies he doesn't have a position anymore because he is dead. How would I fix this issue?
 
Log:
 
 
Full mod:
 
Link to comment
Share on other sites

Here is the part of the log that captured the crash

 

        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/update.lua(7,1)
Stale Component Reference: GUID 100024, @C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/update.lua:6
...steamapps/common/dont_starve/data/scripts/update.lua:7: calling 'SetActiveAreaCenterpoint' on bad self (number expected, got nil)
LUA ERROR stack traceback:
        =[C] in function 'SetActiveAreaCenterpoint'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/update.lua(7,1)
scripts/mods.lua(290,1) unloading prefabs for mod MOD_mrgmview
Collecting garbage...
lua_gc took 0.04 seconds
~SimLuaProxy()
lua_close took 0.10 seconds
Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
HttpClient::ClientThread::Main() complete
Shutting down
Link to comment
Share on other sites

@Ipsquiggle, I was reading the "MAKING_MODS" txt and I was wondering if you might be able to lend some advice on this crash bug

 

 

I have a mod that makes a custom character and when he dies and the the score screen is about to pop up I get a crash with this error report.

 

...steamapps/common/dont_starve/data/scripts/update.lua:7:calling 'SetActiveAreaCenterpoint' on bad self (number expected, got nil)
LUA ERROR stack traceback:
=[C] in function 'SetActiveAreaCenterpoint'
C:/Program Files (x84)/Steam/steamapps/common/dont_starve/data/scripts/update.lua(7,1)
 
when I looked at the update script it seemed like it was the part of the code for keeping the collision mask on point but when the character dies he doesn't have a position anymore because he is dead. How would I fix this issue?
 
Here is the Log:
 
 C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/update.lua(7,1)
Stale Component Reference: GUID 100024, @C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/update.lua:6
...steamapps/common/dont_starve/data/scripts/update.lua:7: calling 'SetActiveAreaCenterpoint' on bad self (number expected, got nil)
LUA ERROR stack traceback:
        =[C] in function 'SetActiveAreaCenterpoint'
        C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/update.lua(7,1)
scripts/mods.lua(290,1) unloading prefabs for mod MOD_mrgmview
Collecting garbage...
lua_gc took 0.04 seconds
~SimLuaProxy()
lua_close took 0.10 seconds
Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
Orphaned unnamed resource. This resource must have used Add( resource ) to insert itself into the manager. 
HttpClient::ClientThread::Main() complete
Shutting down
 

 

 

 

 

I also has a posted about custom item's which are crafted with other custom items not showing up in the crafting menu here:

 

http://forums.kleientertainment.com/topic/27341-tutorial-the-artists-guide-to-characteritem-modding/page-12

Link to comment
Share on other sites

Finally found a Fix

local function dummy(inst)	if GetPlayer() then		local x,y,z = GetPlayer().Transform:GetWorldPosition()			if x == nil and y == nil and z == nil then				TheSim:SetActiveAreaCenterpoint(10,10,10)			end		TheSim:SetActiveAreaCenterpoint(x,y,z)	endendlocal fn = function(inst)		-- If die put somewhere temp	inst:ListenForEvent("LuaWallUpdate", dummy)	end 
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...