Limiting a user to a given amount of traffic

Hi,

Im looking for script like this, from here https://wiki.mikrotik.com/wiki/Limiting_a_user_to_a_given_amount_of_traffic_II that works on mikrotik 6.40

:local traf;
/queue simple
  :for i from=1 to= 254 do =  {
    :if ([/queue simple find target-addresses=("192.168.1." . $i)] != "") do={
      :set traf [get [find target-addresses=("192.168.1." . $i)] total-bytes]
      :if ($traf  > 104857600) do = {
        set [find target-addresses=("192.168.1." . $i)] max-limit= 32000/64000
      }
    }
  }

Seems that this should work:
{
:local traf;
/queue simple
:for i from=1 to=254 do={
:if ([/queue simple find target=(“192.168.1.” . $i . “/32”)] != “”) do={
:set traf [get [find target=(“192.168.1.” . $i . “/32”)] total-bytes]
:if ($traf > 104857600) do={
set [find target=(“192.168.1.” . $i . “/32”)] max-limit=32000/64000
}
}
}
}

Tnx, it works