Using my inv on teh hotspot.

Started by Phemar, Thu 02/09/2004 18:14:56

Previous topic - Next topic

Gilbert

Probably, define a variable in the header only if you want to have variables of the same name that can be set independently in different rooms.

If you want the variable to share value between rooms, you need to declare it in the global script (not header), export it and then import it in the header for each room.
For example:

Global script:
int blah;
export blah;

Script header
import int blah;

Phemar


Perhaps. But I tried with global ints as well and that didn't work.

Phemar


Sorry Gilbert! I only saw your post now! Yes I was using that before you posted and it worked fine, I just wanted to know if the fact that the script header made independent variables was a mistake, or intended.

Well, thanks and cheers.

Gilbert

It's intended, because what the header actually do is that the content of the header is inserted to the top of each of the room scripts.

SMF spam blocked by CleanTalk