I'm not going to answer all your questions at once but I'll try my best. I just hope I don't insult you.
You can keep all the questions, right answers, and possible answers in a multi-dimensional string. It's easier to work with and can make the code less complicated... by that I mean not using GOTO.
` Dimensionalize a string with 51 sets of 6 strings (zero counts)
dim Question$(50,5)
` Question$(xx,0) = Question
` Question$(xx,1) = Correct Answer
` Question$(xx,2) = Multiple Choice #1
` Question$(xx,3) = Multiple Choice #2
` Question$(xx,4) = Multiple Choice #3
` Question$(xx,5) = Multiple Choice #4
Here you have one array with multiple strings. The 50 is the max number of questions (counting zero) so you have room for 51 questions. xx represents each question number from 0 to 50. The line starting with "Question$(xx,0)" shows that the first string 0,0 will be the first question followed by (0,1) which is the right answer to the question, then (0,2) to (0,5) are the choices to that first question.
Here's how your first question should be defined:
` Question #0
Question$(0,0)="What day is today?" ` Question
Question$(0,1)="3" ` Correct Answer
Question$(0,2)="05/10/09" ` Multiple Choice #1
Question$(0,3)="01/20/08" ` Multiple Choice #2
Question$(0,4)=get date$() ` Multiple Choice #3
Question$(0,5)="04/18/09" ` Multiple Choice #4
Using the GET DATE$() command is the easiest way to get the current date (without having to change the answer each day).
A second and third question would look like this:
` Question #1
Question$(1,0)="What is my handle on the Darkbasic forums?"
Question$(1,1)="2"
Question$(1,2)="IanM"
Question$(1,3)="Jgillies"
Question$(1,4)="Bobbel"
Question$(1,5)="Grog Grueslayer"
` Question #2
Question$(2,0)="What is Darkbasic?"
Question$(2,1)="4"
Question$(2,2)="A newbie Jedi on the dark side"
Question$(2,3)="The simple explanation for dark matter"
Question$(2,4)="Boot Camp at night"
Question$(2,5)="A cool programming language"
To repeat something over and over again you can use a DO/LOOP. Showing the question, possible answers, user input, and the answer check can all be in the DO/LOOP.
There's no need to check every answer like you've been doing. You only need to check for the right answer against the input... anything else is wrong. You can use the standard (pseudo code): If this=that then do this else do this.
` Starting Question Number (not really needed since it already starts at zero)
CQuest=0
print "Welcome to MyGame"
` DO this LOOP till the EXIT command is used
do
` Show the current question
print ""
print Question$(CQuest,0)
print ""
` Show all the possible answers for current question
for t=2 to 5
` Show answer number and answer
print str$(t-1)+". "+Question$(CQuest,t)
next t
print ""
input "Enter Answer Here (1-4): ",Answer$
` Check if Answer$ equals the current right answer
if Answer$=Question$(CQuest,1)
` Show that the user got it right
print "Correct!"
` Increase right answers
inc Right
else
` Show that the user got it wrong
print "Wrong!"
` If Answer$ doesn't equal the current right answer then increase wrong answers
inc Wrong
endif
` Check if that's the last question and exit the do/loop
if CQuest=2 then exit
` Increase the current question # (to go to next question on next loop)
inc CQuest
loop
The tile of the game is outside the DO/LOOP so it won't be seen again after the loop has been entered. In the loop the user is shown the question, possible choices, asked for input and the input is checked to see if it's right. The answer check is basically the same as your code except it just checks for the correct answer only and increases the right answer variable... if the string is anything but the right answer it increases the wrong variable. When the program sees "LOOP" it goes back to the start of "DO" and does this till it sees the command "EXIT" (when it checks if CQuest is equal to 2).
` Show the results and score
print ""
print "Well you managed to get "+str$(Right)+" right and "+str$(Wrong)+" wrong."
print ""
print "Your score is: "+str$(Right*150)
wait key
This part just shows the end results (after the loop has been exited). If you want to show the score and/or the right or wrong answers while the questions are being asked just move this inside of the DO/LOOP.
Here's all the code put together:
` Dimensionalize a string with 51 sets of 6 strings (zero counts)
dim Question$(50,5)
` Question$(xx,0) = Question
` Question$(xx,1) = Correct Answer
` Question$(xx,2) = Multiple Choice #1
` Question$(xx,3) = Multiple Choice #2
` Question$(xx,4) = Multiple Choice #3
` Question$(xx,5) = Multiple Choice #4
` Question #0
Question$(0,0)="What day is today?" ` Question
Question$(0,1)="3" ` Correct Answer
Question$(0,2)="05/10/09" ` Multiple Choice #1
Question$(0,3)="01/20/08" ` Multiple Choice #2
Question$(0,4)=get date$() ` Multiple Choice #3
Question$(0,5)="04/18/09" ` Multiple Choice #4
` Question #1
Question$(1,0)="What is my handle on the Darkbasic forums?"
Question$(1,1)="2"
Question$(1,2)="IanM"
Question$(1,3)="Jgillies"
Question$(1,4)="Bobbel"
Question$(1,5)="Grog Grueslayer"
` Question #2
Question$(2,0)="What is Darkbasic?"
Question$(2,1)="4"
Question$(2,2)="A newbie Jedi on the dark side"
Question$(2,3)="The simple explanation for dark matter"
Question$(2,4)="Boot Camp at night"
Question$(2,5)="A cool programming language"
` Starting Question Number (not really needed since it already starts at zero)
CQuest=0
print "Welcome to MyGame"
` DO this LOOP till the EXIT command is used
do
` Show the current question
print ""
print Question$(CQuest,0)
print ""
` Show all the possible answers for current question
for t=2 to 5
` Show answer number and answer
print str$(t-1)+". "+Question$(CQuest,t)
next t
print ""
input "Enter Answer Here (1-4): ",Answer$
` Check if Answer$ equals the current right answer
if Answer$=Question$(CQuest,1)
` Show that the user got it right
print "Correct!"
` Increase right answers
inc Right
else
` Show that the user got it wrong
print "Wrong!"
` If Answer$ doesn't equal the current right answer then increase wrong answers
inc Wrong
endif
` Check if thats the last question and exit the do/loop
if CQuest=2 then exit
` Increase the current question # (to go to next question on next loop)
inc CQuest
loop
` Show the results and score
print ""
print "Well you managed to get "+str$(Right)+" right and "+str$(Wrong)+" wrong."
print ""
print "Your score is: "+str$(Right*150)
wait key
Always avoid GOTO if you can. It's a useful command but there are easier ways to do it. I hope this helps.