I'll just skip to the important part:
I'm REMAKING a jeopardy type game and trying to improve my previous version. So I rewrote the code for all of it based on some of the old code.
The game asks you to select a TEXT file. It opens this file and reads all its data. It stores this data into the FILEDATA() array of a custom defined type (the defined type is called JEOPARDY). Each COUNT in this FILEDATA() array is assigned to a category it reads from the file. The name of the Category is assigned to the variable FILEDATA(x).Category. The Questions from the file are loaded to the FILEDATA(x).QUESTIONS() array. (Same thing goes for the answers!)
The thing is, the file contains extra categories and extra questions within each category. THE GAME CAN ONLY CONTAIN 5 CATEGORIES & 5 QUESTIONS IN EACH CATEGORY. Therefore, I made a GAME() array define as the JEOPARDY type to take only the important data!
I made a code to randomly pick categories & questions. It can only pick a certain category once! In each category, it must select 5 different questions.
I made it uniquely select the categories and that works fine. HOWEVER, when it selects the questions, it sometimes stops proceeding! SOMETIMES IT WORKS :S. I made it log almost every action it takes! I just can't figure out why it SOMETIMES stops loading when it hits a certain question.
I've attached the code. Please take a look at it, and tell me what's wrong with it. If you are willing to write me your own version of the code that does the same task then please do so!
Thank you for your time and effort! I appreciate all the help I receive!
I K
Last edited by INF3RN0666; Feb 11th, 2004 at 05:40 PM.