Can I use if after else?
if (safsafasfasfasfasfa);
else:
if(safasfsafasfasf)
or its not possible in Mikrotik scripting?
:if (version>=6.5) do={
# Do some stuff
} else={
# Do some other stuff
:if (host=27) do={
# Do some other stuff here
}
}
Thanks, just another question is the syntax ok if I want to ping host A and B and both are down switch of CYes you can use as many if and else you like.
ExampleCode: Select all:if (version>=6.5) do={ # Do some stuff } else={ # Do some other stuff :if (host=27) do={ # Do some other stuff here } }
yeh i understand but i want to test two host instead of one before taking some actionScript can be used to nearly all tings, but do not use ping to test for ip up, use netwatch.
https://wiki.mikrotik.com/wiki/Manual:Tools/Netwatch
Do search forum here for example
:if ($test1="true"&&test2="true") do={
# do some here
}