Sory, this is the program that produces me the error.

include "modedefs.bas"
v1 var byte
loop:
POT GPIO.4,255,V1
serout GPIO.0,2,[#V1]
sound GPIO.5,[124,20]
PAUSE 100
SEROUT GPIO.0,2,[12,1]
GOTO LOOP
END