I found other script problems..
- Strange global variables behavior
Global variables are correctly set during script execution … But after script execution :env print will report some variable with correct value and some variable [:nothing]
Every execution, same result,
(i’m usind DDNS script to test it)
http://wiki.mikrotik.com/wiki/Dynamic_DNS_Update_Script_for_ChangeIP.com
- different result of route “get” sentence
> :put [/ip route get 0]
.id=*30000001;dst-address=0.0.0.0/0;gateway=213.205.52.18;gateway-status=213.205
.52.18 reachable pppoe-out1;distance=1;scope=30;target-scope=10;active=true;dyna
mic=true;static=true;disabled=false
no “direct” interface field
As a software developer I could imagine an interface name array visit and substring search…
But off course… Mikrotik script language and environment was not born for this kind of task
- Trying to implement this “bad style” substring search …
I found this doesn’t work too
[admin@Scinty433] > :put [/ip route get 0 gateway-status]
213.205.XX.XX reachable pppoe-out1
[admin@Scinty433] > :put [:find [/ip route get 0 gateway-status] "pppoe-out1"]
[admin@Scinty433] > :put [:find [/ip route get 0 gateway-status] pppoe-out1]
[admin@Scinty433] > :put [:find [/ip route get 0 gateway-status] 213]
[admin@Scinty433] >