whismerhill Posted January 11, 2019 Share Posted January 11, 2019 (edited) hi, I have a bit of a problem I'm unable to solve by myself in one of my released mods. this piece of code never returns : (NOTE: I have stripped the sanity checks & whatnot to make it compact, I can show you more code if desired) local bestweapon = inst.components.inventory:GetEquippedItem(EQUIPSLOTS.HANDS) print("GetRecipe(bestweapon.prefab).Tab", GetRecipe(bestweapon.prefab).Tab) if GetRecipe(bestweapon.prefab).Tab == RECIPETABS.WAR then return bestweapon end print("code is still running, it didn't return") I believe the root of the issue is that GetRecipe(bestweapon.prefab).Tab is always blank. in the log file or console I also tried this : local recipes = GetAllRecipes() if recipes[bestweapon.prefab].Tab == RECIPETABS.WAR then return bestweapon end with the exact same result the thing is : I already used the GetAllRecipes technique in another mod successfully so I'm not sure what mistake I made ... and I'm pretty sure this mod was working fine a long time ago (my last update was in may 2017 ....) Additional Note : the file is in the scripts folder so doesn't need the usual : local RECIPETABS = GLOBAL.RECIPETABS from modmain Edited January 12, 2019 by whismerhill Link to comment https://forums.kleientertainment.com/forums/topic/101690-solvedgetrecipetab-always-blank/ Share on other sites More sharing options...
Developer bizziboi Posted January 12, 2019 Developer Share Posted January 12, 2019 Does Tab need a capital T? I think it's all lowercase? Link to comment https://forums.kleientertainment.com/forums/topic/101690-solvedgetrecipetab-always-blank/#findComment-1142238 Share on other sites More sharing options...
whismerhill Posted January 12, 2019 Author Share Posted January 12, 2019 omg lol a simple case problem again thank you so much. Link to comment https://forums.kleientertainment.com/forums/topic/101690-solvedgetrecipetab-always-blank/#findComment-1142356 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