Sorry, on reviewing my earlier posts I noticed mistakes. Lines where we're checking the value of a numeric variable, like this one here: IF A=="1" THEN... should not have quotes around the numbers. They should actually be like this one below. IF A==1 THEN... We need quotes only if we're using string variables, like this. IF A$=="KOALA" THEN...