unable to use global vars in room scripts?

Started by stuh505, Thu 13/05/2004 05:32:48

Previous topic - Next topic

stuh505

When I try to use the variables I have "exported" from my main script in my room script, it doesn't seem to recognize that they have been defined....

eg:

at the beginning of global script:

int LW_SKILLS[18];

at end of global script:

export LW_SKILLS;

in room script (walks onto region):

if (LW_SKILLS[1]==0)
Ã,  something;

I can get around with by making a function to access and return the variable...but I'm confused why this doens't work to begin with

Scorpiorus

The exported variable is also required to be imported like any other function.

for a certain room:

// room script
import int LW_SKILLS[18];


for all rooms:
// script header
import int LW_SKILLS[18];

SMF spam blocked by CleanTalk