if statement... how?

Hi,

How do I do this in a script?

if var x = var y and var z = yes then
else goto another part of the script

Thanks

https://wiki.mikrotik.com/wiki/Manual:Scripting#Conditional_statement

Yes I know to find that info, but as a beginner that is too hard for me to understand..
So I would like to see some examples…

:local x [/system identity get name];
:local y "MikroTik";
:local z [/system clock get dst-active];

:if ($x = $y && $z) do={
    :put "Router identify is 'MikroTik' and we are currently in dailight savings time.";
} else={
    :put "Either router identity is not 'MikroTik', we are not currently in dailight savings time, or both.";
};

https://wiki.mikrotik.com/wiki/Manual:Scripting-examples

Question answered by a friend who helped me…

:if (($VAR1 = “YES”) && ($VAR2 = “NO”)) do={

Nope… that’s not what I meant… But, see above… SOLVED thanks to a friend…

It would help others, if you could post that solution here.

Yes, you are right normis…

:if ($var1 = $var2 and $var3 = “”) do=
{

}