If you don't use any level, you should include this statement into your main function: level_load(NULL);
Like this:
Code:
void main()
{
   level_load(NULL);
   function1();
   set(pan1,VISIBLE);
}



The mechanism of the script usage is this:
1. include your script at the very beginning of your code
2. you can call/refer to your functions (inside the script) where you want