eworm-de / routeros-scripts

a collection of scripts for MikroTik RouterOS
GNU General Public License v3.0
1.27k stars 285 forks source link

SendTelegram can't be called inside the script #41

Closed hellracer closed 1 year ago

hellracer commented 1 year ago

$SendNotification or $SendTelegram is working properly if invoke in the terminal of mikrotik but calling it inside the script did nothng

eworm-de commented 1 year ago

You need to declare the function first. Put this once before the function calls:

: global SendNotification;

(Or similar for SendTelegram...)

Probably something to add in documentation...

hellracer commented 1 year ago

That was fast, thanks it works!!!

eworm-de commented 1 year ago

Added some more details in 8284035ad8e945f70859c3a9a270058546d11cb6, c0aeee3d3eb4abc006a3cfd4f57da7ab9f290e03 & e9b7c7f7ed540e88006c626c205d9c60c50c1677.