Once again, I'm having problems with scripting. In my GlobalScript, I have the code...
int game_var;
export game_var;
In my Global Script Header, I have the following code...
import int game_var;
In my Room2 RoomScript, I typed in the following code....
int game_var = 7;
and I get the following error message.....
Failed to save room room2.crm; details below
room2.asc(1): Error (line 1): Variable 'game_var' is already imported
If I remove "int" from the last entry and just type in....
game_var = 7;
then I get the following error message.....
Failed to save room room2.crm; details below
room2.asc(1): Error (line 1): Parse error: unexpected 'game_var'
I haven't been able to find any help in the docs, online or in the FAQ's. Can anyone tell me how to change a variable in room? Does this have to be in a function? And if so, does all coding have to occur in a function? Thanks!
int game_var;
export game_var;
In my Global Script Header, I have the following code...
import int game_var;
In my Room2 RoomScript, I typed in the following code....
int game_var = 7;
and I get the following error message.....
Failed to save room room2.crm; details below
room2.asc(1): Error (line 1): Variable 'game_var' is already imported
If I remove "int" from the last entry and just type in....
game_var = 7;
then I get the following error message.....
Failed to save room room2.crm; details below
room2.asc(1): Error (line 1): Parse error: unexpected 'game_var'
I haven't been able to find any help in the docs, online or in the FAQ's. Can anyone tell me how to change a variable in room? Does this have to be in a function? And if so, does all coding have to occur in a function? Thanks!