Community discussions

MikroTik App
 
beepee
Member Candidate
Member Candidate
Topic Author
Posts: 139
Joined: Tue Sep 18, 2007 6:13 am

Help Debug this script

Tue May 24, 2011 5:50 pm

Please I dont know why this script will not run on v4.16
I have different groups of users in Userman and I want to set bandwidth for a group of users identified with "nero"
:global w;
:global strgroup;
:foreach w in [/tool user-manager user find] \
do={  \
:set strgroup [get $w group-name]; \
:if ($strgroup="nero") do={ /tool user-manager user set $w rate-limit="1024k/1024k 0/0 128k/256k"} \
}
Thankx for your comment
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Help Debug this script

Tue May 24, 2011 5:55 pm

:local w;
:local strgroup;
:foreach w in [/tool user-manager user find] do={  
  :set strgroup [/tool user-manager user get $w group-name]; 
  :if ($strgroup="nero") do={ 
    /tool user-manager user set $w rate-limit="1024k/1024k 0/0 128k/256k"
  } 
}
 
beepee
Member Candidate
Member Candidate
Topic Author
Posts: 139
Joined: Tue Sep 18, 2007 6:13 am

Re: Help Debug this script

Tue May 24, 2011 6:03 pm

Thankx Fewi
It worked.