Value use more than one script

Hello!

How can I use a value on more then one script?

I done a following script:

:global currentTime [/system clock get value-name=time]

And when I want to use the currentTime value on another script:

:log info $currentTime

There isn’t happens nothing, the script don’t write the value of the currenTime in the log.

Thank You!

You need to declare the global value in your script. Even if its used before.

:global currentTime
:log info $currentTime