Frictional Games Forum (read-only)

Full Version: More script errors!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Code:
//===========================================
     // Starter's Script File!
     //===========================================

     //===========================================
     // This runs when the map first starts
     void OnStart()
     {
          AddEntityCollideCallback("Player", "ScriptArea_1", "Collide_Area", true, 1);
     }
     void Collide_Area(string &in asParent, string &in asChild, int alState)      
     {
          FadeEnemyToSmoke("servant_grunt_1", true);
     }
    
     {
          AddEntityCollideCallback("Player", "ScriptArea_2", "Message1", true, 1);
     }
    
     void Message1(string &in asChild, string &in asParent, int alState)
     {
          SetMessage("Messages", "RunandHide1", 0);
     }

     //===========================================
     // This runs when the player enters the map
     void OnEnter()
     {
     }

     //===========================================
     // This runs when the player leaves the map
     void OnLeave()
     {
     }

I get an error message saying Unexpected token on the 16th line of this character: "{"


The second collide function is causing the problem. What's wrong with it?
The AddEntityCollideCallback's should be in the same area, this instance the onstart
and each calls for their own func.
so just copy and paste the second one underneath the first callback
(02-05-2012, 01:07 AM)vcplz Wrote: [ -> ]The AddEntityCollideCallback's should be in the same area, this instance the onstart
and each calls for their own func.
so just copy and paste the second one underneath the first callback
Thanks a lot!