Fuffles Posted November 8, 2016 Share Posted November 8, 2016 Hello Survivors, Im currently trying to add a new item althought I have unknown problems with my mod, it crashes everytime I enter my world and I dont mean the crash that shows you what went wrong but under the mod icon there is in red "Crashed!". What is the cause of this? Can those be the art files? Link to comment https://forums.kleientertainment.com/forums/topic/71534-unknown-mod-crash-reason/ Share on other sites More sharing options...
Lumina Posted November 8, 2016 Share Posted November 8, 2016 Usually, try checking the log file. Sometime the screen when you crash can't show you the reason when the log could. If neither of them show the reason, post your mod here, because it's hard to tell without the mod If there is a error in the log and you can't understand it, post both mod and log. Link to comment https://forums.kleientertainment.com/forums/topic/71534-unknown-mod-crash-reason/#findComment-835068 Share on other sites More sharing options...
Fuffles Posted November 8, 2016 Author Share Posted November 8, 2016 If you would tell me where the log file is, it would be nice Link to comment https://forums.kleientertainment.com/forums/topic/71534-unknown-mod-crash-reason/#findComment-835072 Share on other sites More sharing options...
blubuild Posted November 8, 2016 Share Posted November 8, 2016 9 minutes ago, DragonflyTheGiant said: If you would tell me where the log file is, it would be nice http://forums.kleientertainment.com/topic/70821-effective-way-of-learning-lua-programming-and-dst-game-itself/#comment-825701 Link to comment https://forums.kleientertainment.com/forums/topic/71534-unknown-mod-crash-reason/#findComment-835076 Share on other sites More sharing options...
Fuffles Posted November 8, 2016 Author Share Posted November 8, 2016 (edited) Oh it was a stupid mistake but I fixed it, but now I get a new error [00:55:01]: [string "scripts/components/sanityaura.lua"]:8: attempt to call field 'aurafn' (a nil value) LUA ERROR stack traceback: scripts/components/sanityaura.lua:8 in (method) GetAura (Lua) <7-9> scripts/components/sanity.lua:290 in (method) Recalc (Lua) <259-322> scripts/components/sanity.lua:236 in (method) OnUpdate (Lua) <231-245> scripts/update.lua:187 in () ? (Lua) <150-223> and this should be what causes it I think Quote local function flowersets(inst) if not GLOBAL.TheWorld.ismastersim then return end inst:AddComponent("sanityaura") if GetModConfigData("flowerStrenght") == ("1") then inst.components.sanityaura.aura = TUNING.SANITYAURA_SUPERTINY elseif GetModConfigData("flowerStrenght") == ("2") then inst.components.sanityaura.aura = TUNING.SANITYAURA_TINY elseif GetModConfigData("flowerStrenght") == ("3") then inst.components.sanityaura.aura = TUNING.SANITYAURA_SMALL else --No Aura end end AddPrefabPostInit("flower", flowersets) local function pickFern(inst, picker) if picker and picker.components.sanity then picker.components.sanity:DoDelta(TUNING.SANITY_TINY) end inst:Remove() end local function fernSets(inst) if not GLOBAL.TheWorld.ismastersim then return end inst:AddComponent("sanityaura") if GetModConfigData("fernStrenght") == ("1") then inst.components.sanityaura.aura = TUNING.SANITYAURA_SUPERTINY elseif GetModConfigData("fernStrenght") == ("2") then inst.components.sanityaura.aura = TUNING.SANITYAURA_TINY elseif GetModConfigData("fernStrenght") == ("3") then inst.components.sanityaura.aura = TUNING.SANITYAURA_SMALL else --No Aura end inst.components.pickable.onpickedfn = pickFern end AddPrefabPostInit("cave_fern", fernSets) Edited November 8, 2016 by DragonflyTheGiant Link to comment https://forums.kleientertainment.com/forums/topic/71534-unknown-mod-crash-reason/#findComment-835083 Share on other sites More sharing options...
alainmcd Posted November 8, 2016 Share Posted November 8, 2016 if GetModConfigData("flowerStrenght") == ("1") then inst.components.sanityaura.aura = TUNING.SANITYAURA_SUPERTINY elseif GetModConfigData("flowerStrenght") == ("2") then inst.components.sanityaura.aura = TUNING.SANITYAURA_TINY elseif GetModConfigData("flowerStrenght") == ("3") then inst.components.sanityaura.aura = TUNING.SANITYAURA_SMALL else inst.components.sanityaura.aura = 0 --No Aura end and if GetModConfigData("fernStrenght") == ("1") then inst.components.sanityaura.aura = TUNING.SANITYAURA_SUPERTINY elseif GetModConfigData("fernStrenght") == ("2") then inst.components.sanityaura.aura = TUNING.SANITYAURA_TINY elseif GetModConfigData("fernStrenght") == ("3") then inst.components.sanityaura.aura = TUNING.SANITYAURA_SMALL else inst.components.sanityaura.aura = 0 --No Aura end Link to comment https://forums.kleientertainment.com/forums/topic/71534-unknown-mod-crash-reason/#findComment-835088 Share on other sites More sharing options...
Fuffles Posted November 8, 2016 Author Share Posted November 8, 2016 6 minutes ago, alainmcd said: if GetModConfigData("flowerStrenght") == ("1") then inst.components.sanityaura.aura = TUNING.SANITYAURA_SUPERTINY elseif GetModConfigData("flowerStrenght") == ("2") then inst.components.sanityaura.aura = TUNING.SANITYAURA_TINY elseif GetModConfigData("flowerStrenght") == ("3") then inst.components.sanityaura.aura = TUNING.SANITYAURA_SMALL else inst.components.sanityaura.aura = 0 --No Aura end and if GetModConfigData("fernStrenght") == ("1") then inst.components.sanityaura.aura = TUNING.SANITYAURA_SUPERTINY elseif GetModConfigData("fernStrenght") == ("2") then inst.components.sanityaura.aura = TUNING.SANITYAURA_TINY elseif GetModConfigData("fernStrenght") == ("3") then inst.components.sanityaura.aura = TUNING.SANITYAURA_SMALL else inst.components.sanityaura.aura = 0 --No Aura end no changes the same error again Link to comment https://forums.kleientertainment.com/forums/topic/71534-unknown-mod-crash-reason/#findComment-835094 Share on other sites More sharing options...
CarlZalph Posted November 8, 2016 Share Posted November 8, 2016 (edited) @DragonflyTheGiant Add a GLOBAL. for each TUNING- right now you're making them nil which defaults to calling the aurafn because nil and nil or nil. So: GLOBAL.TUNING.SANITYAURA_TINY etc. Tidbit of personal annoyance: "Strenght" -> "Strength" Edited November 8, 2016 by CarlZalph Added player callout for notification. Link to comment https://forums.kleientertainment.com/forums/topic/71534-unknown-mod-crash-reason/#findComment-835106 Share on other sites More sharing options...
alainmcd Posted November 8, 2016 Share Posted November 8, 2016 Yup, what CarlZalph said. My bad, sanityaura.aura already defaults to 0, so my previous suggestion does nothing. Sorry about that. Link to comment https://forums.kleientertainment.com/forums/topic/71534-unknown-mod-crash-reason/#findComment-835112 Share on other sites More sharing options...
Fuffles Posted November 8, 2016 Author Share Posted November 8, 2016 5 minutes ago, alainmcd said: Yup, what CarlZalph said. My bad, sanityaura.aura already defaults to 0, so my previous suggestion does nothing. Sorry about that. no worries Link to comment https://forums.kleientertainment.com/forums/topic/71534-unknown-mod-crash-reason/#findComment-835115 Share on other sites More sharing options...
Serpens Posted November 8, 2016 Share Posted November 8, 2016 26 minutes ago, CarlZalph said: @DragonflyTheGiant Add a GLOBAL. for each TUNING- right now you're making them nil which defaults to calling the aurafn because nil and nil or nil. So: GLOBAL.TUNING.SANITYAURA_TINY etc. Tidbit of personal annoyance: "Strenght" -> "Strength" why is GLOBAL needed ? I thought in case of TUNING you don't need GLOBAL , even in modmain?! Link to comment https://forums.kleientertainment.com/forums/topic/71534-unknown-mod-crash-reason/#findComment-835118 Share on other sites More sharing options...
Fuffles Posted November 8, 2016 Author Share Posted November 8, 2016 (edited) Hahaha Fun Fact, the error stayed Quote local function flowersets(inst) if not GLOBAL.TheWorld.ismastersim then return end inst:AddComponent("sanityaura") if GetModConfigData("flowerStrenght") == ("1") then inst.components.sanityaura.aura = GLOBAL.TUNING.SANITYAURA_SUPERTINY elseif GetModConfigData("flowerStrenght") == ("2") then inst.components.sanityaura.aura = GLOBAL.TUNING.SANITYAURA_TINY elseif GetModConfigData("flowerStrenght") == ("3") then inst.components.sanityaura.aura = GLOBAL.TUNING.SANITYAURA_SMALL else inst.components.sanityaura.aura = 0 end end Edited November 8, 2016 by DragonflyTheGiant Link to comment https://forums.kleientertainment.com/forums/topic/71534-unknown-mod-crash-reason/#findComment-835138 Share on other sites More sharing options...
CarlZalph Posted November 8, 2016 Share Posted November 8, 2016 14 minutes ago, DragonflyTheGiant said: Hahaha Fun Fact, the error stayed SUPERTINY doesn't exist. SANITYAURA_TINY = 100/(seg_time*32), SANITYAURA_SMALL_TINY = 100/(seg_time*20), SANITYAURA_SMALL = 100/(seg_time*8), SANITYAURA_MED = 100/(seg_time*5), SANITYAURA_LARGE = 100/(seg_time*2), SANITYAURA_HUGE = 100/(seg_time*.5), Pick 'em. Link to comment https://forums.kleientertainment.com/forums/topic/71534-unknown-mod-crash-reason/#findComment-835144 Share on other sites More sharing options...
Fuffles Posted November 8, 2016 Author Share Posted November 8, 2016 15 minutes ago, DragonflyTheGiant said: Oh thats what I get for using DS mods as examples .-. btw this text is nice and never occured in this convo Link to comment https://forums.kleientertainment.com/forums/topic/71534-unknown-mod-crash-reason/#findComment-835146 Share on other sites More sharing options...
Fuffles Posted November 8, 2016 Author Share Posted November 8, 2016 I'd love to thank you with a spoiler for my mod althought the only item is invisible atm and has no name haha, I need to find a modded item with the newest version Link to comment https://forums.kleientertainment.com/forums/topic/71534-unknown-mod-crash-reason/#findComment-835151 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