Script not running
Posted: Fri May 31, 2024 11:05 pm
Dear users, hope you doing well. I am trying to learn more about scripting in RouteOS so I am writing some codes to help me understand the possibilities. But I need a way to debug the script and it's no working well.
There is a button called ˜Run Script" in the script window, but when I run it I just do not receive any message in Log.
do {
:local notificationTeam ({{"1";"2"};{"3";"4"}});
:local Host $host
:put "$notificationTeam->0"
/log info message="$notificationTeam->0"
} on-error={
:put "Erro ao rodar script netwatch"
}
I don't know why, but the :put command just doesn't work for me.
/log info works well, I can see the debug command... But I am not obtaining the correct value from arrays. How to correctly access the array information to obtain 1 and 2... and... 3 and 4 for the second array?
Hope someone can help me in my journey of script learning.
There is a button called ˜Run Script" in the script window, but when I run it I just do not receive any message in Log.
do {
:local notificationTeam ({{"1";"2"};{"3";"4"}});
:local Host $host
:put "$notificationTeam->0"
/log info message="$notificationTeam->0"
} on-error={
:put "Erro ao rodar script netwatch"
}
I don't know why, but the :put command just doesn't work for me.
/log info works well, I can see the debug command... But I am not obtaining the correct value from arrays. How to correctly access the array information to obtain 1 and 2... and... 3 and 4 for the second array?
Hope someone can help me in my journey of script learning.