Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Mats Berglinn on Sat 11/06/2005 10:55:25

Title: Need big help with export ints problem.(SOLVED)
Post by: Mats Berglinn on Sat 11/06/2005 10:55:25
I have a little problem with exporting ints. I have made up an int called "int distract" and I have put the commando "import int distract" in the room script but when I put the "export distract" at the end of the Global Script the programm gives me this error:

Error (line 1070): cannot export undefined symbol 'distract'

I'm using this in Prosikto's MI2 Template in AGS version 2.62. What is actually wrong? The manual tells clearly that I should put the "export (intname)" at the END of the Global Script but it's still doesn't work.
Title: Re: Need big help with export ints problem.
Post by: strazer on Sat 11/06/2005 16:34:13
Are you sure you have defined the variable ("int distract;") at the very top of the global script, outside of any functions? You cannot export/import local variables.
Title: Re: Need big help with export ints problem.
Post by: Mats Berglinn on Sat 11/06/2005 17:29:16
Thanks for the help, I thought that the "int distract;" would be set in section game start. Ok, it's solved!  :D :D