whismerhill Posted January 11, 2019 Share Posted January 11, 2019 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 Link to comment 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 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 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.