Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 2    Views: 75

AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
03/05/15 10:03 AM (9 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=
 
Arubaman
Aspiring developer
Profile
Posts: 636
Reg: Oct 20, 2011
Akron
16,910
like
03/05/15 11:10 AM (9 years ago)
Easy fix, thanks for posting it.
 
maverick96
Lost but trying
Profile
Posts: 174
Reg: Jan 22, 2014
Orlando
3,390
like
03/05/15 04:43 PM (9 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.