BillBobJoy Posted February 11, 2014 Share Posted February 11, 2014 (edited) @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: log.txt Full mod: mrgmview.zip Edited February 13, 2014 by BillBobJoy Link to comment https://forums.kleientertainment.com/forums/topic/31535-mod-help-custom-character-crashes-on-death/ Share on other sites More sharing options...
BillBobJoy Posted February 11, 2014 Author Share Posted February 11, 2014 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 secondsOrphaned 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() completeShutting down Link to comment https://forums.kleientertainment.com/forums/topic/31535-mod-help-custom-character-crashes-on-death/#findComment-414514 Share on other sites More sharing options...
BillBobJoy Posted February 12, 2014 Author Share Posted February 12, 2014 (edited) @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_mrgmviewCollecting garbage...lua_gc took 0.04 seconds~SimLuaProxy()lua_close took 0.10 secondsOrphaned 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() completeShutting 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 Edited February 12, 2014 by BillBobJoy Link to comment https://forums.kleientertainment.com/forums/topic/31535-mod-help-custom-character-crashes-on-death/#findComment-414689 Share on other sites More sharing options...
BillBobJoy Posted February 14, 2014 Author Share Posted February 14, 2014 Finally found a Fixlocal 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 https://forums.kleientertainment.com/forums/topic/31535-mod-help-custom-character-crashes-on-death/#findComment-415685 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now