I created my own module script and in the header I declared a variable. I can access this variable via any script, but I've noticed today that I can't actually alter the variable. Is there some kind of import/export routine required here?
The contents of the header are included (i.e. inserted into) every script. So what you have done is declare separate variables in each script, each having the same variable name but not the same contents. I think what you want to do instead is to put the variable declaration and export statement in the module script and then put a corresponding import statement in the header.
// *** Module Script ***
int MyVariable;
export MyVariable;
// *** Module Header ***
import int MyVariable;
Ah, right on. I didn't know it actually declared them in each script, no wonder why I was getting crazy results.
Is the export actually required? Would import not do the work of export?
Edit: Never mind. I discovered that it results in a bad import. :P Thanks.