Basic dynmanic queue script for shaping

Hi

My scripting skill are pathetic but have tried to create a script that will shape my clients once they reach 200megs per day.

Here Goes

:local traf;
/queue simple
:foreach i in=[/queue simple find dynamic=yes] do={
:set traf [get [/queue simple find dynamic=yes] total-bytes]
:if ($traf > 209715200) do = {
set [/queue simple find dynamic=yes] max-limit= 32000/32000
}
}

Can anyone tell why this does not work ?

:local traf 0;
/queue simple
:foreach i in=[find dynamic=yes] do={
    :set traf [get $i total-bytes]
    :if ($traf > 209715200) do = {
           set $i max-limit= 32000/32000
    }
}

Should look something like that.

Thanks