Skip to main content
removed commentary
Source Link
Gnemlock
  • 5.3k
  • 5
  • 30
  • 60

You could potentially be causing problems by editing the iterator in your for loop setQuestionIndex(). 

Try doing it without, like:

void setQuestionIndex()
{
    int questionIterator = 0;
    for (int i = 0; i < questionNumbersChoosen.Length; i++) {
         int questionNum = Random.Range (0, questions.Length);
         if (!isContain (questionNumbersChoosen, questionNum))
         {
              questionNumbersChoosen [questionIterator ] = questionNum;
              questionIterator ++;
         }
     }
}

That is unless I'm missing the reason why you're doing that?

You could potentially be causing problems by editing the iterator in your for loop setQuestionIndex(). Try doing it without, like:

void setQuestionIndex()
{
    int questionIterator = 0;
    for (int i = 0; i < questionNumbersChoosen.Length; i++) {
         int questionNum = Random.Range (0, questions.Length);
         if (!isContain (questionNumbersChoosen, questionNum))
         {
              questionNumbersChoosen [questionIterator ] = questionNum;
              questionIterator ++;
         }
     }
}

That is unless I'm missing the reason why you're doing that?

You could potentially be causing problems by editing the iterator in your for loop setQuestionIndex(). 

Try doing it without, like:

void setQuestionIndex()
{
    int questionIterator = 0;
    for (int i = 0; i < questionNumbersChoosen.Length; i++) {
         int questionNum = Random.Range (0, questions.Length);
         if (!isContain (questionNumbersChoosen, questionNum))
         {
              questionNumbersChoosen [questionIterator ] = questionNum;
              questionIterator ++;
         }
     }
}

You could potentially be causing problems by editing the iterator in your for loop setQuestionIndex(). Try doing it without, like:

void setQuestionIndex() { int questionIterator = 0; for (int i = 0; i < questionNumbersChoosen.Length; i++) { int questionNum = Random.Range (0, questions.Length); if (!isContain (questionNumbersChoosen, questionNum)) { questionNumbersChoosen [questionIterator ] = questionNum; questionIterator ++; } } }

void setQuestionIndex()
{
    int questionIterator = 0;
    for (int i = 0; i < questionNumbersChoosen.Length; i++) {
         int questionNum = Random.Range (0, questions.Length);
         if (!isContain (questionNumbersChoosen, questionNum))
         {
              questionNumbersChoosen [questionIterator ] = questionNum;
              questionIterator ++;
         }
     }
}

That is unless I'm missing the reason why you're doing that?

You could potentially be causing problems by editing the iterator in your for loop setQuestionIndex(). Try doing it without, like:

void setQuestionIndex() { int questionIterator = 0; for (int i = 0; i < questionNumbersChoosen.Length; i++) { int questionNum = Random.Range (0, questions.Length); if (!isContain (questionNumbersChoosen, questionNum)) { questionNumbersChoosen [questionIterator ] = questionNum; questionIterator ++; } } }

That is unless I'm missing the reason why you're doing that?

You could potentially be causing problems by editing the iterator in your for loop setQuestionIndex(). Try doing it without, like:

void setQuestionIndex()
{
    int questionIterator = 0;
    for (int i = 0; i < questionNumbersChoosen.Length; i++) {
         int questionNum = Random.Range (0, questions.Length);
         if (!isContain (questionNumbersChoosen, questionNum))
         {
              questionNumbersChoosen [questionIterator ] = questionNum;
              questionIterator ++;
         }
     }
}

That is unless I'm missing the reason why you're doing that?

added 2 characters in body
Source Link
DavidC
  • 281
  • 1
  • 8

You could potentially be causing problems by editing the iterator in your for loop set question indexsetQuestionIndex(). Try doing it without, like:

void setQuestionIndex() { int questionIterator = 0; for (int i = 0; i < questionNumbersChoosen.Length; i++) { int questionNum = Random.Range (0, questions.Length); if (!isContain (questionNumbersChoosen, questionNum)) { questionNumbersChoosen [questionIterator ] = questionNum; questionIterator ++; } } }

That is unless I'm missing the reason why you're doing that?

You could potentially be causing problems by editing the iterator in your for loop set question index. Try doing it without, like:

void setQuestionIndex() { int questionIterator = 0; for (int i = 0; i < questionNumbersChoosen.Length; i++) { int questionNum = Random.Range (0, questions.Length); if (!isContain (questionNumbersChoosen, questionNum)) { questionNumbersChoosen [questionIterator ] = questionNum; questionIterator ++; } } }

That is unless I'm missing the reason why you're doing that?

You could potentially be causing problems by editing the iterator in your for loop setQuestionIndex(). Try doing it without, like:

void setQuestionIndex() { int questionIterator = 0; for (int i = 0; i < questionNumbersChoosen.Length; i++) { int questionNum = Random.Range (0, questions.Length); if (!isContain (questionNumbersChoosen, questionNum)) { questionNumbersChoosen [questionIterator ] = questionNum; questionIterator ++; } } }

That is unless I'm missing the reason why you're doing that?

Source Link
DavidC
  • 281
  • 1
  • 8
Loading