You need to add in the part gardian206 was talking about:
AnswerN < RightAnswers.Num()
also use && in place of and
if (AnswerN < RightAnswers.Num() && RightAnswers.Num()>=1 && RightAnswers[AnswerN] == Zero->GetMaterials()[0]->GetName())
{
// code here
}