In my scenario, I had 3 items in my inventory. Combining the 1st and 2nd item by dragging one onto another leaves the first two slots empty and places the newly created item in the 4th slot. I then make an action call to collapse the inventory menu with animation and wait for it to finish. Once finished, I attempt to display a piece of dialogue. The dialogue triggers a sync call between AC and Lua, which is where the problem occurs.
Since the first two slots are empty, the following line fails in SyncInventoryToLua. Calling Find on a List with null items appears to be the cause of this failure.
Code: Select all
InvItem runtimeItem = runtimeInventory.localItems.Find(x => x.id == item.id);
Code: Select all
InvItem runtimeItem = runtimeInventory.GetItem(item.id);
Replace
Code: Select all
InvItem item = runtimeInventory.localItems.Find(x => x.id == itemID);
Code: Select all
InvItem item = runtimeInventory.GetItem(itemID);
Jack