New to Scripting, having an error on string comparison

I’m having an error when comparing two IP address that are casted to a string. All the logging messages are just there for me to track the code and make sure everything is working, which it is not.

:local step 0;
:local length;
:local strippednet;
:local ipAdd;
:foreach inter in=[/routing ospf network find] do={
:set $length [:len [routing ospf network get value-name=network $step]];
:set $strippednet [:tostr [:pick [routing ospf network get value-name=network $step] 0 ($length-3)]];
:local SecondStep 0;
:foreach inter in=[/ip address find] do={
:set $length [:len [ip address get value-name=network $SecondStep]];
:set $ipAdd [:tostr [:pick [ip address get value-name=network $SecondStep] 0 ($length)]];

:set $SecondStep ($SecondStep+1);
:log info message="Comparing";
:log info message=$strippednet;
:log info message="To";
:log info message=$ipAdd;
:log info message=($ipAdd = $srippednet) 
:if ($srippednet = $ipAdd) do={
:log info message="Found Match";
}
}
:set $step ($step+1);

}

Regardless of whether you know how to program or not, don’t you think that proper formatting helps to read what you wrote?

Too many error and nonsense to be understanded correctly to desume what you try to do…

Call items by number not work, only on print.
In your opinion, what is the use of the “inter” variable if you don’t use it? Using a counter that passes the result makes no sense.

:local fnet 0.0.0.0/0
:local spos 0
:local snet 0.0.0.0

/routing ospf network
:foreach inter in=[find] do={
:set fnet [get $inter network]
:set spos [:find $fnet “/” -1]
:set snet [:toip [:pick $fnet 0 $spos]]
/ip address
:log info “Searching $snet network on interface addresses”
:if ([:len [find where ($network = $snet)]] > 0) do={
:log info “Found Match ($snet)”
}
}