Global variable not seen in script

I can’t find a way to see a global varable that is defined in the script run in the scheduler. The scheduler calls the second part of the script but that can’t see the global variable. On both the policleis: read, write, policy and test checked and the second script is called after defining the global variable with /system run secondscript. Admin is the owner scheduler and the script, however in the terminal I can’t see the owner of the scheduler when I do a print. In Winbox I see the owner.
In the terminal I can also see the global variable in the environment.

My version RouterOS is 6.40RC24 on the moment.

Try to declare the variable in that script again.

Thanks Jarda, the second script can now read the variable set in the first script.

All I had to do is put a line in the second script before the variable is used:

:global name-of-variable-used-in-the-first-scipt;