Hey hpfan,
I've seen your error in the code, and it's a common mistake. What you've done is reset the value of
a to 2 each loop, in other words, you need to take a=2 out of the do..loop itteration.
The revised code is here:
a = 2
do
if keystate(31) = 1 then CLS : Text 0,0,"'tart'"
if keystate(20) = 1 then CLS : Text 0,0,"'art'"
if keystate(30) = 1 then CLS : Text 0,0,"'rt'" : a = 1
if keystate(19) = 1 then CLS : Text 0,0,"'t'"
if keystate(20) = 1 and a = 1 then CLS : Text 0,0,"''"
loop
In your version of the code, by the time you've pressed keystate(30), and then pressed keystate(20),
a has already reverted back to 2.
Hope it helps.