Script To Add Hotspot IP Binding

Hi,

I cannot get the following single line to work in a script:

/ip hotspot ip-binding add address=192.168.100.24 place-before=0

I already have an ip binding that is a pass-all rule in case anyone is curious about the place-before command. I am running v3.30.

If I run this from the command line it works. If I remove the place-before it works. If I run the script directly from the command line it works. It worked correctly on v3.23.

HELP!!

Thanks

Malcolm

ok.

This seems to be yet another stupid Mikrotik coding mistake. If I change my command to:

/ip hotspot ip-binding add address=192.168.100.24 place-before=1

then it works in a script. It will fail in the terminal, which at least means I can work around the problem. But frankly just goes to show the lack of coding change control which seems to be commonplace :frowning:

Malcolm

For anyone else with this problem - here is the reply from MT support:

Hello,

Try to put following line at the beginning of the script
/ip hotspot ip-binding print
This will save into buffer item numbers ad script will be able to use
place-before=0

Regards,
Maris

It still is a pain in the ass that an upgrade from 3.23->3.30 breaks a previously fully working script.

Malcolm