I have write a script where a global variable is defined and get some value. The script is periodically called by the sheduler. And between calls the variable lose its value. But if I call the script manually using ‘run’ command — everything works fine, global variable preserve its value between script calls.
Why is it so? How can I make the global variable to keep its value?
It should work as long as you declare the global variable in the script:
:global myVar
If you’ve already done that… show the script and maybe someone can take a look.