Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Entropy on Mon 03/05/2010 19:17:21

Title: Variable 'X' is already imported
Post by: Entropy on Mon 03/05/2010 19:17:21
Hi, new to the forum and to AGS itself, been going well for the past couple days, but lately I keep getting this same error in my scripts.
The Script says this:

function cChar1.Say("blahblahblahblah etc.

or, on my other script

bool gGUI.Visible = false;

and every time I try to run the script I get this same error message:

Failed to save room room1.crm; details below
room1.asc(2): Error (line 2): Variable 'cChar1' is already imported

help?
Title: Re: Variable 'X' is already imported
Post by: Calin Leafshade on Mon 03/05/2010 20:09:05
the  function keyword is for defining NEW funtions.

functions that have already been defined (like say) go inside other functions to be run.

like


function Room_AfterFadeIn(){


cChar1.Say("OMG I can speak!");

}

Title: Re: Variable 'X' is already imported
Post by: Entropy on Tue 04/05/2010 08:13:31
Danke.