BillBobJoy Posted March 14, 2014 Share Posted March 14, 2014 (edited) Hello, I have realized sometimes when I am playing during the summer I get this crash. I have looked over the log and when the game tries to start making it rain something goes wrong. I have looked and I honestly don't understand what's wrong. This is the Crash: ...ont_starve/data/scripts/components/seasonmanager.lua:218: attempt to index field 'SoundEmitter' (a nil value)LUA ERROR stack traceback: C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/components/seasonmanager.lua(218,1) in function 'OnRainStart' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/components/seasonmanager.lua(83,1) in function 'fn' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/entityscript.lua(693,1) in function 'PushEvent' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/components/seasonmanager.lua(860,1) in function 'StartPrecip' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/components/seasonmanager.lua(802,1) in function 'UpdateDynamicPrecip' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/components/seasonmanager.lua(1149,1) in function 'OnUpdate' C:/Program Files (x86)/Steam/steamapps/common/dont_starve/data/scripts/update.lua(104,1) Edited March 14, 2014 by BillBobJoy Link to comment https://forums.kleientertainment.com/forums/topic/32845-mod-help-custom-character-crashes-in-the-summer-right-before-rain-starts-in-rog/ Share on other sites More sharing options...
squeek Posted March 14, 2014 Share Posted March 14, 2014 The attachment isn't working and didn't post the actual error message (the line right before LUA ERROR stack traceback: is the error). Link to comment https://forums.kleientertainment.com/forums/topic/32845-mod-help-custom-character-crashes-in-the-summer-right-before-rain-starts-in-rog/#findComment-431294 Share on other sites More sharing options...
BillBobJoy Posted March 14, 2014 Author Share Posted March 14, 2014 (edited) @squeek I edited the post and I'll do the attachment again log.txt Edited March 14, 2014 by BillBobJoy Link to comment https://forums.kleientertainment.com/forums/topic/32845-mod-help-custom-character-crashes-in-the-summer-right-before-rain-starts-in-rog/#findComment-431301 Share on other sites More sharing options...
iWitch Posted March 14, 2014 Share Posted March 14, 2014 ...ont_starve/data/scripts/components/seasonmanager.lua:218: attempt to index field 'SoundEmitter' (a nil value)you missed 1 line in your first post Link to comment https://forums.kleientertainment.com/forums/topic/32845-mod-help-custom-character-crashes-in-the-summer-right-before-rain-starts-in-rog/#findComment-431302 Share on other sites More sharing options...
BillBobJoy Posted March 14, 2014 Author Share Posted March 14, 2014 @iWitch yeah I missed it but I edited it in now lol XD Link to comment https://forums.kleientertainment.com/forums/topic/32845-mod-help-custom-character-crashes-in-the-summer-right-before-rain-starts-in-rog/#findComment-431304 Share on other sites More sharing options...
squeek Posted March 14, 2014 Share Posted March 14, 2014 I do not know how that error is possible. It's saying that the world has no SoundEmitter. You'd have to be like... adding the seasonmanager component to an entity without a sound emitter, or... removing the sound emitter from the world prefab. Link to comment https://forums.kleientertainment.com/forums/topic/32845-mod-help-custom-character-crashes-in-the-summer-right-before-rain-starts-in-rog/#findComment-431313 Share on other sites More sharing options...
BillBobJoy Posted March 14, 2014 Author Share Posted March 14, 2014 @squeek That's what I thought here is my mod mrgmview.zip other than that, do you think it's a game bug? The prefab "mrhat" has the season manager but as I said, I only get crashes in the middle summer and they happen with or without that item. Link to comment https://forums.kleientertainment.com/forums/topic/32845-mod-help-custom-character-crashes-in-the-summer-right-before-rain-starts-in-rog/#findComment-431316 Share on other sites More sharing options...
squeek Posted March 14, 2014 Share Posted March 14, 2014 (edited) @squeek That's what I thought here is my mod mrgmview.zip other than that, do you think it's a game bug? The prefab "mrhat" has the season manager but as I said, I only get crashes in the middle summer and they happen with or without that item. Haha, well that solves that then. You should never add the seasonmanager component to anything except the world prefab. Basically, unless you're creating new world types, you should never add the seasonmanager to anything. In looking at your code, I'm unsure why you thought you needed it. Edited March 14, 2014 by squeek Link to comment https://forums.kleientertainment.com/forums/topic/32845-mod-help-custom-character-crashes-in-the-summer-right-before-rain-starts-in-rog/#findComment-431317 Share on other sites More sharing options...
BillBobJoy Posted March 14, 2014 Author Share Posted March 14, 2014 (edited) @squeekI have not had that issue before, I use the component to differentiate between seasons.the character himself, prefab mr7 has had it since I started the mod Edited March 14, 2014 by BillBobJoy Link to comment https://forums.kleientertainment.com/forums/topic/32845-mod-help-custom-character-crashes-in-the-summer-right-before-rain-starts-in-rog/#findComment-431318 Share on other sites More sharing options...
squeek Posted March 14, 2014 Share Posted March 14, 2014 (edited) You don't need the seasonmanager on a prefab to be able to differentiate between seasons. The function GetSeasonManager() can be called from anywhere and gives you the world's seasonmanager component for you to differentiate between seasons with. The seasonmanager component is written to only work when added to the world prefab and it's written so that there should only be one seasonmanager component that exists at a time. The name should give that away. You don't want your player or your hat to manage the seasons. That doesn't make any sense. Edited March 14, 2014 by squeek Link to comment https://forums.kleientertainment.com/forums/topic/32845-mod-help-custom-character-crashes-in-the-summer-right-before-rain-starts-in-rog/#findComment-431320 Share on other sites More sharing options...
BillBobJoy Posted March 14, 2014 Author Share Posted March 14, 2014 (edited) @squeek So I can just remove inst:AddComponent("seasonmanager") and it will work the same? Edited March 14, 2014 by BillBobJoy Link to comment https://forums.kleientertainment.com/forums/topic/32845-mod-help-custom-character-crashes-in-the-summer-right-before-rain-starts-in-rog/#findComment-431322 Share on other sites More sharing options...
squeek Posted March 14, 2014 Share Posted March 14, 2014 (edited) So I can just inst:AddComponent("seasonmanager") and it will work the same?If you forgot a word and that was meant to say "So I can just remove inst:AddComponent("seasonmanager") and it will work the same?", then yes. Remove it from mrhat and mr7. Edited March 14, 2014 by squeek Link to comment https://forums.kleientertainment.com/forums/topic/32845-mod-help-custom-character-crashes-in-the-summer-right-before-rain-starts-in-rog/#findComment-431324 Share on other sites More sharing options...
BillBobJoy Posted March 14, 2014 Author Share Posted March 14, 2014 (edited) @squeek Yes I forgot that word, my bad getting late where I live, 3 AM, been trying to fix this for hours.I am trying your suggestion out and thins seem to be going OK, right now I have the game running testing to see what happens. Edited March 14, 2014 by BillBobJoy Link to comment https://forums.kleientertainment.com/forums/topic/32845-mod-help-custom-character-crashes-in-the-summer-right-before-rain-starts-in-rog/#findComment-431325 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