mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-03-05 05:29:37 +00:00
mode-button: use :onerror for outer block
This commit is contained in:
parent
c643069b3e
commit
7e530949d9
1 changed files with 4 additions and 4 deletions
|
|
@ -13,7 +13,7 @@
|
|||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||
|
||||
:local ExitOK false;
|
||||
:do {
|
||||
:onerror Err {
|
||||
:local ScriptName [ :jobname ];
|
||||
|
||||
:global ModeButton;
|
||||
|
|
@ -83,7 +83,7 @@
|
|||
$LogPrint info $FuncName ("No action defined for " . $Count . " mode-button presses.");
|
||||
}
|
||||
} on-error={
|
||||
:global ExitError; $ExitError false $0;
|
||||
:global ExitError; $ExitError false $0 $Err;
|
||||
} }
|
||||
/system/scheduler/add name="_ModeButtonScheduler" \
|
||||
on-event=":global ModeButtonScheduler; \$ModeButtonScheduler;" interval=3s;
|
||||
|
|
@ -91,6 +91,6 @@
|
|||
$LogPrint debug $ScriptName ("Updating scheduler _ModeButtonScheduler...");
|
||||
/system/scheduler/set $Scheduler start-time=[ /system/clock/get time ];
|
||||
}
|
||||
} on-error={
|
||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||
} do={
|
||||
:global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue