it is not unusual to incorrectly use the result of an operation as a boolean.
as an example, a string compare returns an integer, not true/false.
this code will throw the error you see:
if name.compareTo("foretek") then ' <<<< compareTo() returns an int, not a boolean
log("hello, " & name)
else
log("you are not foretek")
end if
in this example, the correct syntax is: if name.compareTo("foretek") = 0 then...
see if any operations that you are using to determine true or false actually return an integer.
there is a hint in the error message: your sub rxprocess