Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Jono on Thu 13/11/2008 14:12:22

Title: Importing custom functions into global header (solved)
Post by: Jono on Thu 13/11/2008 14:12:22
I have two functions called AddReminder and LoseReminder. I want to use them in room scripts as well as the global script. I have exported them at the end of the global script, and imported them into the global header. However, when I try to use LoseReminder in the middle of a function in my room script, it comes back with a parse error.

I've used it within the function hDoor_Interact() as follows:



LoseReminder("Phone Mum.");

Title: Re: Importing custom functions into global header
Post by: Khris on Thu 13/11/2008 14:45:24
You don't need to export functions.

// header

import function AddReminder(String text);
import function LoseReminder(String text);


Why do people always open another thread about their same problem...?
Title: Re: Importing custom functions into global header
Post by: Jono on Thu 13/11/2008 23:05:30
thanks!