Community discussions

MikroTik App
 
szhura
just joined
Topic Author
Posts: 6
Joined: Fri May 17, 2019 1:04 pm

problem with /ip firewall mangle get number in scripting

Tue Feb 02, 2021 12:29 pm

https://c2n.me/4aMVj07
see. when i do put [/ip firewall mangle get number=1 packets] in terminal i get 6 and this is right nubmer
but in my script :set numnew [ /ip firewall mangle get number=1 packets ]; returns 8(!)
what am i doing wrong??
 
pe1chl
Forum Guru
Forum Guru
Posts: 7232
Joined: Mon Jun 08, 2015 12:09 pm

Re: problem with /ip firewall mangle get number in scripting

Tue Feb 02, 2021 12:33 pm

You are using numbers in scripts. That cannot be done, numbers are only valid in interactive sessions (after print command).
You must use [find ...] in scripts.
 
szhura
just joined
Topic Author
Posts: 6
Joined: Fri May 17, 2019 1:04 pm

Re: problem with /ip firewall mangle get number in scripting

Tue Feb 02, 2021 12:37 pm

understood. thank you.

Who is online

Users browsing this forum: andya and 32 guests