
R1D1

So, I thought I read somewhere in the forums that the variables that I create are all global. I wrote an "initialize" script that I run before any other script once I power up my EZB4. This script is for the purpose of declaring all of my variables, among other things.
I wrote another script that would not work. It contains variables that are declared in my "initialize" script which I run first. However after I declared the variables in the script which they are used in, then the script worked. Do I always have to declare variables in the script in which they are being used, or do I somehow need to specify that they are global variables so they can be used in other scripts?
If they have to be declared in the script in which they are being used, then how can I pass data from one script to another collected and stored in the form of variables?
Any guidance would be appreciated.
Make sure you run the init script first before any other scripts.... Tip: You can use the variable watcher to help debug your scripts...
Also, I don't know how many time I have looked at a variable that generated an error knowing full well that I initialized it. I looked at the initialization spelling and the spelling in the line that caused the error and just could not find any difference. Yet there was a difference. The quickest way to overcome that sort of thing is to copy the original and paste it over the one at the point of the error.
Thanks everyone for quick replies. I'm off and running again!