To the best of my knowledge, PB does not expect a colon after 'then'.


>> if spacet = 0 then: random pulset1'Randomize value in pulset1

Also, is one of those consecutive gotos supposed to be a gosub?