I tried this
- Code: Select all
vault.Refresh(delegate ()
{
foreach (var items in allitems)
{
Int32 now = vault.Count(items);
if (vault.Has(items))
{
int repeat = now;
for (int i = 0; i < repeat; i++)
{
VaultItem item = vault.First(items);
Console.WriteLine("The Player has: " + items);
vault.Consume(new VaultItem[] { item }, delegate ()
{
//Console.WriteLine("The Player has: " + items);
});
}
}
}
It works but once it finds, the item in the items array that the vualt does not contain its Gives Error
(Picture Below)
Can this be fixed ?
Link for pic if it does not load below : http://prnt.sc/ag19fg