Global variable works in one script, but not another

What RouterOS did you test it on?

I did cut and past all data to terminal (winth {} around the code} on a router running 7.6 and all works fine.
.
Code.png

Use Splunk> to log/monitor your MikroTik Router(s). See link below. :mrgreen:

MikroTik->Splunk