Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
More script errors!
Strembitsky Offline
Senior Member

Posts: 254
Threads: 37
Joined: Feb 2012
Reputation: 3
#1
More script errors!

//===========================================
     // 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?
(This post was last modified: 02-05-2012, 12:58 AM by Strembitsky.)
02-05-2012, 12:58 AM
Find
vcplz Offline
Member

Posts: 115
Threads: 3
Joined: Apr 2011
Reputation: 1
#2
RE: More script errors!

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
Find
Strembitsky Offline
Senior Member

Posts: 254
Threads: 37
Joined: Feb 2012
Reputation: 3
#3
RE: More script errors!

(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!
02-05-2012, 01:26 AM
Find




Users browsing this thread: 2 Guest(s)