:log info doesn't work from a script

Hi all!

RouterOS 3.16

I need to get a number of packets from a filter rule of a firewall.
When I try this from a terminal - it works, when from a script - it doesn’t.

:log info ([/ip firewall filter get 0 packets])

Can somebody tell me why?

Thanks.

I think it needs a print command first…

:log info works from a script, its your get 0 command that fails

I know that :log info works good from a script; anyway the script I wrote in my previous post also works good from a terminal, but not from a script.

just as fosben said.
get does not work inside scripts.

Use

something like this:
:log info ([/ip firewall filter get [ find comment=“lala”] packets])

That works.
Thanks!