Bane08 Posted April 27, 2015 Share Posted April 27, 2015 My mod keeps crashing and I'm not 100% sure why. I made a torch and everytime it runs out it crashes the game. I've attached my log file I'll add any other text anyone needs. Also as I'm sure you can see I have an issue with "component heater already exists!" and "component firefx already exists!" I'd like to fix that too, but preferably get the crash fixed first.log.txt Link to comment Share on other sites More sharing options...
DarkXero Posted April 27, 2015 Share Posted April 27, 2015 Post the torch code, I can't imagine what you are doing to get that kind of error. Link to comment Share on other sites More sharing options...
Bane08 Posted April 27, 2015 Author Share Posted April 27, 2015 I'm sure I'm doing something stupid.endothermic_torch.luaendothermic_torchfire.lua Link to comment Share on other sites More sharing options...
DarkXero Posted April 27, 2015 Share Posted April 27, 2015 (edited) Did you copy a mod for don't starve for the endothermic torch? The code is missing network code, inst.entity:AddNetwork(), and lacks the if TheWorld.ismastersim then return inst end.Look at torch.lua or lighter.lua. Same for the fire, torchfire.lua. Edited April 27, 2015 by DarkXero Link to comment Share on other sites More sharing options...
Bane08 Posted April 27, 2015 Author Share Posted April 27, 2015 That is exactly what I did yes. I'm trying to learn and figured starting with this would be easy just took a few small tweaks. Thanks a ton. Link to comment Share on other sites More sharing options...
Bane08 Posted April 27, 2015 Author Share Posted April 27, 2015 Do you have any idea on the "component heater already exists!" and "component firefx already exists!" errors. I copied it from the coldfirefire.lua but apparently that's not right. Link to comment Share on other sites More sharing options...
DarkXero Posted April 27, 2015 Share Posted April 27, 2015 In the endothermic_torchfire, you have two AddComponent inside updateFunc.So everytime the torch updates its light level, it calls AddComponent, and there was already a component, so it prints that message. Link to comment Share on other sites More sharing options...
Kzisor Posted April 28, 2015 Share Posted April 28, 2015 @Bane08, to get around that message simply add: if not inst.components.heater then inst:AddComponent("heater")end if not inst.components.firefx then inst:AddComponent("firefx")end Link to comment Share on other sites More sharing options...
Bane08 Posted April 28, 2015 Author Share Posted April 28, 2015 Thank you both. A ton. Link to comment 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