Hi, how can I add the returning value in ItemsIDArr
Array?
what I am trying,
.h
`void RandomItemID(EItemType ItemType, FST_ItemsIDandType& Item);`
`void AddRandomID();`
void AMyTestActor::AddRandomID()
{
TArray<FST_ItemsIDandType> ItemsIDArr{};
FST_ItemsIDandType LocItemID;
for (auto& Array : ItemsTypeArr)
{
RandomItemID(Array, LocItemID);
ItemsIDArr.Add(LocItemID);
}ItemsTypeArr.Empty();
}
the problem is the engine crashed when clicked play.