Hi Cesar35, I took some time to look at this code, truthfully I have not studied PBasic the $99 version, it appears it's syntax is a little different from PBasicPro, it spit it out patoey! Are you using the $99 version or are you using the Pro $250 version ? If using the Pro version the code below will compile. Will it run? Do not know. I compiled for 16F84A.
Code:
'****************************************************************
'*  Name    : RufBot TX.BAS                                      *
'*  Author  : [select VIEW...EDITOR OPTIONS]                    *
'*  Notice  : Copyright (c) 2008 [select VIEW...EDITOR OPTIONS] *
'*          : All Rights Reserved                               *
'*  Date    : 11/16/08                                          *
'*  Version : 1.0                                               *
'*  Notes   :                                                   *
'*          :                                                   *
'****************************************************************

include "modedefs.bas"

trisb = 134
 trisa = 133
 portb = 6
 porta = 5
low 1
input 0
input 2
B0 var byte
B1 var byte
start:
pot 0,50,B0

pot 2,50,B1
B0 = B0 * 5
B1 = B1 * 5
y:
if B0 < 100 then yf
if B0 > 150 then yb

x:
if B1 < 100 then xr
if B1 > 150 then xl
serout 1,n9600,[5]
goto start

yf:
serout 1,n9600,[2]
goto start

yb:
serout 1,n9600,[1]
goto start

xl:
serout 1,n9600,[3]
goto start

xr:
serout 1,n9600,[4]
goto start

end