FaceMelter
Member
I am working on a gump, and I need to assign each of these variables in the foreach() loop.
I tried looping the AddItem statement, but it did not work.
I need to set each variable to item.ItemID as it processes the loop.
So, with what I have posted, how can I load the variables i've created during the loop?
Is there a better way to do this?
I tried looping the AddItem statement, but it did not work.
I need to set each variable to item.ItemID as it processes the loop.
Code:
int b1image = 0;
int b2image = 0;
int b3image = 0;
int b4image = 0;
int b5image = 0;
int b6image = 0;
int b7image = 0;
int b8image = 0;
int b9image = 0;
int b10image = 0;
List<Item> ItemsPack = mPouch.Items;
int xa = 0;
foreach (Item item in ItemsPack) // for each of Item item in the pouch.
{
AddItem(xa, 10, item.ItemID);
Console.WriteLine(item.ItemID);
}
Is there a better way to do this?
Last edited: