I have an enum ENUMA in script A. I have a list of that enum in script A and also script B. I have a foreach loop in script C to compare those two lists, which I cannot get to work.
I get the following errors:
Using the generic type list requires 1 type arguments. GenericInventory.Itemtypes is a type, which is not valid. foreach statement cannot operate on variables of type bool.
I feel I have a core misunderstanding of enums but I am not sure what it is. More than the error itself, why is this occurring?
Script A
public enum ItemTypes
{
Blank,
Attack,
Defend,
Assist,
Misc,
}
public List<ItemTypes> RequiredTypes = new List<ItemTypes>();
Script B
public List<ItemTypes> AllowedTypes = new List<ItemTypes>();
Script C
foreach (GenericInventory.ItemTypes type in List <GenericInventory.ItemTypes> itemsparent_inventory.RequiredTypes)