whats the point in using
;echo -a %read
you probably was testing it and forgot it...
if ($sockerr) { echo >> Erro ao conectar... | halt }
you posted on your language in an international forum