Crafting List problem

GarrowGlitch

  • Posts: 217
First i'm going to point out that the global attribute "Inventory List" holds the items & "Inventory Map" holds that Item with the Amount.....

So i had this working yesterday, idk what happened but apparently When i click on an item to craft it, the "For each ITEM in MATERIAL" Loop only registers the last item in the list. (outlined in red) So if it takes 20 Wood and 20 Stone to craft something, It only registers when i have enough Stone. if that makes sense ::) I've attached a pic to show whats going on here. Help would be much appreciated!

merrak

  • *
  • Posts: 2265
Whatever the value of "Can Craft" is set to will be overwritten by the next item. If you have 20 stone, "Can Craft" is set to true regardless of whether or not you had enough wood.

Set "Can Craft" to true at the very beginning, before any looping. Then take out the 'set "Can Craft" to true' block you currently have. This will ensure that once "Can Craft" is set to false, it can never be set to true again before the next check.

GarrowGlitch

  • Posts: 217
Thank you!! took me a little bit but it seems to be working