Peldan 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 16 
	Threads: 3 
	Joined: Mar 2012
	
 Reputation: 
0
		
	 | 
	
		
			
[FIRST SCRIPT] unexpected end of file 
			 
			
				Hey guys! 
This is my first script ever, I am just playing around a little bit. Also took some help from tutorials. 
However, when I added the Entity collision for the third room area, I started to get this error:
 
"Unexpected end of file". Any idea what's wrong?   
http://pastebin.com/fzi7bta2 Here's the code <-
 void OnStart() {     AddEntityCollideCallback("Player", "RoomTwoArea", "CollideRoomTwo", true, 1);     AddEntityCollideCallBack("Player", "RoomThreeArea", "CollideRoomThree", true, 1");     AddUseItemCallback("", "key_study_1", "mansion_2", "UnlockDD", true);     AddUseItemCallback("", "ceremony_knife_1", "work_desk_door_1", "UnlockDD", true);     GiveItemFromFile("lantern", "lantern.ent");     SetPlayerLampOil(100.0f); }
  void CollideRoomTwo(string &in asParent, string &in asChild, int alState) {     SetSwingDoorClosed("mansion_2", true, true);     StartPlayerLookAt("mansion_2", 10, 10, "");     PlaySoundAtEntity("", "00_laugh.snt", "mansion_2", 0, false);     AddTimer("close", 1, "stoplook"); }
  void CollideRoomThree(string &in asParent, string &in asChild, int alState) {     SetEntityActive("agrippa_head_1", true);     StartPlayerLookAt("agrippa_head_1", 10, 10, "");     PlaySoundAtEntity("", "00_laugh.snt", "graveyard_corpse_1", 0, false);     AddTimer("lolol", 1, "stoplook");     SetPropHealth("pot_explode", 0); }
  void UnlockDD(string &in item, string &in door) {     SetSwingDoorLocked(door, false, true);     PlaySoundAtEntity("", "scare_slam_door.snt", door, 0, false);     RemoveItem(item); }
  void stoplook(string &in asTimer) {     StopPlayerLookAt(); }
  void OnEnter() {
  }
  void OnLeave() {
  } 
 
 
EDIT: Finally found that little bastard    It was this:
 AddEntityCollideCallBack("Player", "RoomThreeArea", "CollideRoomThree", true, 1"); 
 
  
			 
			
			
			
				
(This post was last modified: 03-04-2012, 04:46 PM by Peldan.)
 
				
			 
		 |  
	 
 | 
 
	| 03-04-2012, 04:10 PM  | 
	
		
	 | 
 
 
	
		
		Apjjm 
 
 
		
			Is easy to say 
			
			
			
 
			
	Posts: 496 
	Threads: 18 
	Joined: Apr 2011
	
 Reputation: 
52
		
	 | 
	
		
			
RE: [FIRST SCRIPT] unexpected end of file 
			 
			
				Looks like you have an extra " at the end of one of your AddEntityCollideCallbacks. Try this. 
void OnStart() 
{ 
    AddEntityCollideCallback("Player", "RoomTwoArea", "CollideRoomTwo", true, 1); 
    AddEntityCollideCallBack("Player", "RoomThreeArea", "CollideRoomThree", true, 1); 
    AddUseItemCallback("", "key_study_1", "mansion_2", "UnlockDD", true); 
    AddUseItemCallback("", "ceremony_knife_1", "work_desk_door_1", "UnlockDD", true); 
    GiveItemFromFile("lantern", "lantern.ent"); 
    SetPlayerLampOil(100.0f); 
}
  
			 
			
			
			
				
(This post was last modified: 03-04-2012, 04:44 PM by Apjjm.)
 
				
			 
		 |  
	 
 | 
 
	| 03-04-2012, 04:43 PM  | 
	
		
	 | 
 
 
	
		
		Peldan 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 16 
	Threads: 3 
	Joined: Mar 2012
	
 Reputation: 
0
		
	 | 
	
		
			
RE: [FIRST SCRIPT] unexpected end of file 
			 
			
				 (03-04-2012, 04:43 PM)Apjjm Wrote:  Looks like you have an extra " at the end of one of your AddEntityCollideCallbacks. Try this. 
-snip- Yeah, I noticed that :p 
 
Got another error now, lol. I remember solving this before on my own, but I don't remember how!
 
Error:
  Quote: main(5,2) : ERR : No matching signatures to blablablabla AddEntityCollideCallBack 
 
Any idea what's wrong? Nothing has changed in my previous code except the little ". 
The areanames are correct..
			  
			
			
			
		 |  
	 
 | 
 
	| 03-04-2012, 04:51 PM  | 
	
		
	 | 
 
 
	
		
		Apjjm 
 
 
		
			Is easy to say 
			
			
			
 
			
	Posts: 496 
	Threads: 18 
	Joined: Apr 2011
	
 Reputation: 
52
		
	 | 
	
		
			
RE: [FIRST SCRIPT] unexpected end of file 
			 
			
				Method names are case-sensitive. Try using "AddEntityCollideCallback" for the second one.
			 
			
			
			
		 |  
	 
 | 
 
	| 03-04-2012, 04:55 PM  | 
	
		
	 | 
 
 
	
		
		flamez3 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 1,281 
	Threads: 48 
	Joined: Apr 2011
	
 Reputation: 
57
		
	 | 
	
		
			
RE: [FIRST SCRIPT] unexpected end of file 
			 
			
				The "b" in AddEntityCollideCallback is not supposed to be capitalized  
 
Edit: I dun got ninja'd >_>
			 
			
			
 
			
				
(This post was last modified: 03-04-2012, 04:57 PM by flamez3.)
 
				
			 
		 |  
	 
 | 
 
	| 03-04-2012, 04:56 PM  | 
	
		
	 | 
 
 
	
		
		Peldan 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 16 
	Threads: 3 
	Joined: Mar 2012
	
 Reputation: 
0
		
	 | 
	
		
			
RE: [FIRST SCRIPT] unexpected end of file 
			 
			
				Stupid of me.. Thank you!
			 
			
			
			
		 |  
	 
 | 
 
	| 03-04-2012, 04:58 PM  | 
	
		
	 | 
 
 
	 
 |