V6.44.5

if ([ip route find comment=“PTP_VALEVERDE_AP (MIMOSA)”]) do={put RotaExiste} else={put RotaNaoExiste}

I am using this line in V6.44.5 but I receive by terminal “conditional is not boolean”.

Later, I saw a teaching video using this exactly line of command in V7.12.1 and was working.
I wanted to know if this is about the version or something else. Thank you

Works fine on 7.15.3, so time to upgrade. RouterOS 6.44.5 is from 2019. (upgrade in steps)

TWO BAD ADVICES (intended or not):

  1. Go straight to 7.15.x without passing to 6.49.x, 7.12.x etc.
  2. For solve one problem, can broke everything if use 6.x scripting and go to 7.x…


    Hint: Go at least to last long-term 6.49.13 and use correct version-less syntax…
:if ([:len [/ip route find where comment="PTP_VALEVERDE_AP (MIMOSA)"]] > 0) do={:put "RotaExiste"} else={:put "RotaNaoExiste"}