nyashr3dd3r Posted January 18, 2023 Share Posted January 18, 2023 hey :3! I'm trying to mod in a character with a beard that provides extra defense while it's larger, which did work well for a bit. but it started crashing my game every time it reached the 3rd beard level. Can anyone provide any advice? Thanks! worraine.lua If it helps. I believe this error might have something to do with it: [00:01:46]: [string "scripts/components/beard.lua"]:54: attempt to perform arithmetic on field 'bits' (a nil value) LUA ERROR stack traceback: scripts/components/beard.lua:54 in (method) GetInsulation (Lua) <53-55> self = prize = beefalowool callbacks = table: 000000004667E620 isgrowing = true onreset = function - ../mods/worraine1/scripts/prefabs/worraine.lua:22 insulation_factor = 1 inst = 119665 - worraine (valid:true) is_skinnable = true daysgrowth = 3 scripts/components/temperature.lua:250 in (method) GetInsulation (Lua) <228-265> self = inherentsummerinsulation = 0 totalmodifiers = 0 shelterinsulation = 180 mintemp = -20 maxmoisturepenalty = 30 hurtrate = 1.25 inherentinsulation = 0 ignoreheatertags = table: 000000002FCB10B0 maxtemp = 90 rate = 0 usespawnlight = true sheltered_level = 1 delta = -0.87508750391372 externalheaterpower = 0 sheltered = false overheattemp = 70 _ = table: 000000002FCB0CA0 inst = 119665 - worraine (valid:true) winterInsulation = 0 summerInsulation = 0 scripts/components/temperature.lua:432 in (method) OnUpdate (Lua) <273-453> self = inherentsummerinsulation = 0 totalmodifiers = 0 shelterinsulation = 180 mintemp = -20 maxmoisturepenalty = 30 hurtrate = 1.25 inherentinsulation = 0 ignoreheatertags = table: 000000002FCB10B0 maxtemp = 90 rate = 0 usespawnlight = true sheltered_level = 1 delta = -0.87508750391372 externalheaterpower = 0 sheltered = false overheattemp = 70 _ = table: 000000002FCB0CA0 inst = 119665 - worraine (valid:true) dt = 0.033333335071802 applyhealthdelta = nil mintemp = -20 maxtemp = 90 ambient_temperature = 28.125514051045 owner = nil inside_pocket_container = false sleepingbag_ambient_temp = false ents = table: 00000000314D4CD0 scripts/update.lua:257 in () ? (Lua) <219-293> dt = 0.033333335071802 tick = 587 k = 119665 v = 119665 - worraine (valid:true) cmp = table: 000000002FCB0520 [00:01:46]: [string "scripts/components/beard.lua"]:54: attempt to perform arithmetic on field 'bits' (a nil value) LUA ERROR stack traceback: scripts/components/beard.lua:54 in (method) GetInsulation (Lua) <53-55> scripts/components/temperature.lua:250 in (method) GetInsulation (Lua) <228-265> scripts/components/temperature.lua:432 in (method) OnUpdate (Lua) <273-453> scripts/update.lua:257 in () ? (Lua) <219-293> Link to comment https://forums.kleientertainment.com/forums/topic/145645-help-with-hp-absorption/ Share on other sites More sharing options...
Merkyrrie Posted January 21, 2023 Share Posted January 21, 2023 Looks like it might be because on line 63 of your file, its setting your beard's bits to the 6th in the table instead of 3rd like I'm assuming you want. Since there is no 6th value in the table its setting bits to nil, which is causing the crash. Hope this helps! Link to comment https://forums.kleientertainment.com/forums/topic/145645-help-with-hp-absorption/#findComment-1618316 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