Script to throttle Specific IP addresses after usage of gigs

Hi good day All

I a hoping the pro’s can help me out here we have static ip addresses for our users and we currently manage their speeds manually (max limits)
when a user reaches their agreed imit of 10,20 ,30 or 40gig etc wev usually go to winbox/ques/simple go the ip of user double click and change their max limits to 512k/512k for the rest of the month , i’ve tried to use this in terminal
:local traffic
/queue simple
:for i from=211 to=211 do={ #211 is a users ip address
:set [get [find target-addresses=“192.168.20.211/32”] total-bytes]
:if ($traffic > 1000000) do={
set [find target-addresses=“192.168.20.211/32”] max-limit=128000/128000
} }
it seems to work but wen i go to ques the max limits never change , where am I going wrong , please help…