Posts: 11
Threads: 6
Joined: Jun 2003
How can i get the program to add a number to another figure when i reach a certain point.
For example
If i made a quiz where the contestant gets 3 points for a correct answer how would i add that 3 points to his total. He has an option to view his stats and i want the points to add to his total points in his stats.
HELP!!!
Tom
Posts: 704
Threads: 0
Joined: Dec 2002
maybe by intializing a variable TOTAL to zero, e.g.,
TOTAL = 0
and then in your loop (or whatever) doing something like
TOTAL = TOTAL + POINTS
(Why do I have a sinking feeling that I totally misunderstood your question?)
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Posts: 2,765
Threads: 138
Joined: Nov 2002
does it check if he got the right answer directly after the question?
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Posts: 37
Threads: 8
Joined: May 2003
like this
Code:
Contestant1.points = 0
INPUT " Question 1, Do I rule? ", question1$
IF question1$ = "yes" THEN
Contestant1.points = Contestant1.points + 1
ELSE
Contestant1.points = Contestant1.points - 1
In the last line, you could just have Contestant1.points = Contestant1.points , which would mean you don't lose any points.
Was that your question ?
LA BLA BLA
Posts: 11
Threads: 6
Joined: Jun 2003
That was exactly wot i wanted!!!
thanks. il giv it a try!!