Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 2    Views: 75

Aspiring developer
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
03/05/15 10:03 AM (8 years ago)

Interactive Quiz Fix for Random Answers (IOS)

I noticed recently that I as able to predict the answers in my 10 question quiz - e.g. the answer to my first question was always the first answer position and I could predict the next nine answers as well. My questions are set to random, but if I you close my app then restart it, the questions always come up in the exact same, not really random order. To fix this, in the BT_screen_quiz.m file, search for "random()" and replace it with "arc4random()". Credit for this fix goes to MGoBlue, who noticed it in earlier versions of the quiz (2 years ago!). It would nice to see this fixed in the next update please. Cheers, Alan http://www.buzztouch.com/forum/thread.php?tid=2E7FC128544E84882D1226A&command=isSearching&currentPage=1&topicTitle=random&createdBy=&repliedBy=&minViews=-1&maxViews=-1&minReplies=-1&maxReplies=-1&forumCategory=
Aspiring developer
Posts: 636
Reg: Oct 20, 2011
03/05/15 11:10 AM (8 years ago)
Easy fix, thanks for posting it.
Lost but trying
Posts: 174
Reg: Jan 22, 2014
03/05/15 04:43 PM (8 years ago)
Awesome. Thanks! I was just finishing up on my quiz app. I did notice something else. I know the quiz just randomly picks from the file but I seem to get a lot of repeat questions from one game to the next without closing the app. Is there any way of having questions chosen in first game not get chosen in the next game? Just curious. Thanks!

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.