Quote:
Originally Posted by LittleX1
You might also check your randomization code again.. Maybe based on the random code, you're trying to access an object which doesn't exist.
|
I have discovered that it is a NSRange Exception....index is beyond bounds. I can only assume that it was my code and that what was generated was beyond what I had in the text file (?).
The following is what I have. It probably isn't pretty, but I am just trying to work on small things and learn.
int i;
int j;
i = 15; i > 0;
j = arc4random() % i;
questionNumber = (j + 1);
NSInteger row = 0;
if (questionNumber < 1);
{
row = 0;
}
if(questionNumber == 1);
{
row = questionNumber - 1;
}
if(questionNumber > 1);
{
row = ((questionNumber - 1) * 6);
}
Again, it probably isn't pretty, but I did finally get something to work...if only for a little while.

Any ideas on how to make this work? I appreciate the help.