mr.bonent   
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 47 
	Threads: 13 
	Joined: May 2011
	
 Reputation: 
0  
		 
	 
	
		
			
script error 
  
			 
			
				What's the wrong in this script?
Sorry but I'm new in scripting.
Quote: { 
AddEntityCollideCallback("Player", "DoorClosedArea_1", "DoorClosedAndLook", true, 1); 
} 
 
void DoorClosedAndLook(string &in asParent, string &in asChild, int alState) 
{ 
SetSwingDoorClosed("mansion_6", true, true); 
StartPlayerLookAt("mansion_6", 10.0f, 10.0f, ""); 
AddTimer("", 1.0f, "stoplook"); 
} 
void stoplook(string &in asTimer) 
{ 
StopPlayerLookAt(); 
} 
That's the error.
			
 
			
 
 
Attached Files  
 
 
  error.jpg  (Size: 6.81 KB / Downloads: 198)
 
			
			
		  
	
 
 
	07-31-2011, 06:20 PM   
	
		
	 
 
	
		 
		palistov   
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 1,208 
	Threads: 67 
	Joined: Mar 2011
	
 Reputation: 
57  
		 
	 
	
		
			
RE: script error 
  
			 
			
				You're missing some of your script. There aren't even 17 lines in what you posted. 
 
Anyways, in your script, look at the the first 17 lines. There's likely a extra/missing brace somewhere.
			
			
			
 
			
		  
	
 
 
	07-31-2011, 06:59 PM   
	
		
	 
 
	
		 
		mr.bonent   
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 47 
	Threads: 13 
	Joined: May 2011
	
 Reputation: 
0  
		 
	 
	
		
			
RE: script error 
  
			 
			
				Here are the missing lines.
Quote: void OnStart() 
{ 
AddEntityCollideCallback("Player", "ScriptArea_1", "BuchErscheinung", true, 1); 
} 
 
void BuchErscheinung(string &in asParent, string &in asChild, int alState) 
{ 
     SetEntityActive("buch", true); 
	 AddDebugMessage("buch", false); 
} 
 
 
 
 
 
 
{ 
AddEntityCollideCallback("Player", "DoorClosedArea_1", "DoorClosedAndLook", true, 1); 
} 
 
void DoorClosedAndLook(string &in asParent, string &in asChild, int alState) 
{ 
SetSwingDoorClosed("mansion_6", true, true); 
StartPlayerLookAt("mansion_6", 10.0f, 10.0f, ""); 
AddTimer("", 1.0f, "stoplook"); 
} 
void stoplook(string &in asTimer) 
{ 
StopPlayerLookAt(); 
} 
 
 
 
 
 
 
 
 
 
void OnEnter() 
{ 
} 
void OnLeave() 
{ 
} 
			 
			
			
			
		  
	
 
 
	07-31-2011, 09:22 PM   
	
		
	 
 
	
		 
		Kyle   
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 911 
	Threads: 36 
	Joined: Sep 2010
	
 Reputation: 
7  
		 
	 
	
		
			
RE: script error 
  
			 
			
				You can't make functions out of nothing, there must be the type, name, and parameters for each one. The AddEntityCollideCallback is supposed to be in the "void OnStart()" function.
void OnStart() 
{ 
     AddEntityCollideCallback("Player", "ScriptArea_1", "BuchErscheinung", true, 1); 
     AddEntityCollideCallback("Player", "DoorClosedArea_1", "DoorClosedAndLook", true, 1); 
} 
void BuchErscheinung(string &in asParent, string &in asChild, int alState) 
{ 
     SetEntityActive("buch", true); 
     AddDebugMessage("buch", false); 
} 
void DoorClosedAndLook(string &in asParent, string &in asChild, int alState) 
{ 
     SetSwingDoorClosed("mansion_6", true, true); 
     StartPlayerLookAt("mansion_6", 10.0f, 10.0f, ""); 
     AddTimer("", 1.0f, "stoplook"); 
} 
void stoplook(string &in asTimer) 
{ 
     StopPlayerLookAt(); 
} 
void OnEnter() 
{ 
} 
void OnLeave() 
{ 
}
 
			 
			
			
 
			
		  
	
 
 
	07-31-2011, 09:39 PM   
	
		
	 
 
	
		 
		mr.bonent   
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 47 
	Threads: 13 
	Joined: May 2011
	
 Reputation: 
0  
		 
	 
	
		
			
RE: script error 
  
			 
			
				Well thank you very much.
 It works.
			
 
			
			
			
		  
	
 
 
	07-31-2011, 09:53 PM