leprucio Posted September 13, 2016 Share Posted September 13, 2016 First 4 all Hi, i having and really estrange issue i have the code to gain sanity when any dress tab item its equiped BUT i dont really dont know why if i equip a Tentacle Spike the game crash... Then i solve it (under in spoiler) i will share how to solve (because i see it in other archived post's) local function sanityfn(inst) for k,v in pairs(inst.components.inventory.equipslots) do if AllRecipes[v.prefab].tab == RECIPETABS.DRESS then return TUNING.DAPPERNESS_LARGE end end return 0 end (and in the "local master_postinit = function(inst)") inst.components.sanity.custom_rate_fn = sanityfn Spoiler local function sanityfn(inst) for k,v in pairs(inst.components.inventory.equipslots) do if AllRecipes[v.prefab] and AllRecipes[v.prefab].tab == RECIPETABS.DRESS then return TUNING.DAPPERNESS_LARGE end end return 0 end It look like a undefinited item (tentacle spike) who have a nill value in tab location (maybe) easy fix addin before "Allrecipes..." a condition to see if really be a recipe or not and then the rest of normal funtion. Link to comment https://forums.kleientertainment.com/forums/topic/70122-tentacle-spike-crash-solved/ 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