set antenna-gain via script

Hi,

I’m using RouterOS 5.6
I want to make a script to change antenna gain to a specific value.
I made:

/interface wireless
set antenna-gain=0

It prompt me new gain, but I want to set it up without asking me to 0 value.
How do I have to change the script?

Thanks!

I also have a problem with:

/ip dns 
set servers=12.12.12.12
servers=4.2.2.1
servers=13.13.13.13

it says: “Script file loaded successfullysyntax error (line 48 column 8)”

(line 48 column 8) is the = prior 4.2.2.1

I believe you need to set all DNS servers in a single comma separated list, i.e.

/ip dns 
set servers=12.12.12.12,4.2.2.1,13.13.13.13

It works If you pass IP statically.

Look at:

:local DNS1
:local DNS2
:local DNS3

:set DNS1 “208.67.222.222”
:set DNS2 “4.2.2.1”
:set DNS3 “208.67.220.220”

/ip dns set servers=$DNS1,$DNS2,$DNS3

xpected end of command at the first comma after $DNS1

/interface wireless set 0 antenna-gain=0

or you can access interfaces by their names:

/interface wireless set mywifi antenna-gain=0

Put quotes around the variables:
/ip dns set servers=“$DNS1,$DNS2,$DNS3”