These are were you are getting problems from:
do space = space -1
endif
if space = 0 then goto Test1p3
endif
The "DO" is only for "DO"-"LOOP"s.
The endif there needs to be deleted. On the line before,
if space = 0 then goto Test1p3 already takes care of the "endif" because the outcome of the statement is already on the same line.
Example:
SYNC ON
SYNC RATE 60
`The "DO" is the beginning of a main loop
DO
`This has an endif because it has multiple lines.
IF ThisCode = 1
Print "This Code = 1!"
endif
`This does not have an endif because it is on one line.
IF ThisCode = 1 then Print "This Code = 1!"
`The "Loop" is the end of a main loop.
`Anything between these two will repeat forever until you
`press escape.
LOOP
END
I see what you are trying to do at the end. You might try this at the end:
Test1p2:
print "Good. Now, this test will test your endurance. When you're ready, press enter."
input " " ;input4$
CLS
set text opaque
space = 1
REPEAT
set cursor 0,0: print "Press the space bar 100 times."
`Shows the user how many times they pressed space.
print "You have pressed it: " + str$(space) " times"
`checks space bar status. the "spacekeyup" is used so the user has to press it instead of just holding it.
if spacekey()= 1 and spacekeyup = 0
`this makes the program know the space key is pressed.
spacekeyup = 1
space = space + 1
endif
`Here, if the spacekey is no longer being pressed, the program shows this by making "spacekeyup" = 0
if spacekey()= 0 then spacekeyup = 0
`It will keep going back to "REPEAT" until "space" = 100
UNTIL space = 100
Hopefully this helps!
My green thumb grew the tree my Trojan War horse was crafted from. With roses in our pockets we rally round the tombstones. Ashes to ashes, we all fall down.