X4anco 
 
 
		
			Member 
			
			
			
 
			
	Posts: 157 
	Threads: 66 
	Joined: Apr 2011
	
 Reputation: 
0
		
	 | 
	
		
			
Script ERROR need help N00B 
			 
			
				Here is my script can you see any errors because the game thinks there is: 
 
void OnStart () 
{ 
	AddUseItemCallback ("", "Corridor Key", "door_1", "UsedkeyOnDoor", true); 
} 
void UsedKeyOnDoor (string &in asItem, string &in asEntity) 
{ 
 	SetSwingDoorLocked("door_1", false, true); 
	playSoundAtEntity("", "unlock_door", "door_1", 0, false,); 
	RemoveItem("Corridor key"); 
} 
 
I have done all the extra_english stuff :d
			 
			
			
 
... 
			
		 |  
	 
 | 
 
	| 04-30-2011, 09:10 PM  | 
	
		
	 | 
 
 
	
		
		NylePudding 
 
 
		
			Member 
			
			
			
 
			
	Posts: 77 
	Threads: 23 
	Joined: Apr 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Script ERROR need help N00B 
			 
			
				If I understand correctly you have made an extremely easy mistake to correct. 
playSoundAtEntity("", "unlock_door", "door_1", 0, false,);
 
should be: playSoundAtEntity("", "unlock_door", "door_1", 0, false);
 
You had a comma at the end of "false".
 
C++ is annoying like that, hope it helps.   
			 
			
			
			
		 |  
	 
 | 
 
	| 04-30-2011, 09:22 PM  | 
	
		
	 | 
 
 
	
		
		Exostalker 
 
 
		
			Member 
			
			
			
 
			
	Posts: 204 
	Threads: 10 
	Joined: Aug 2010
	
 Reputation: 
3
		
	 | 
	
		
			
RE: Script ERROR need help N00B 
			 
			
			
			
 
			
		 |  
	 
 | 
 
	| 04-30-2011, 09:23 PM  | 
	
		
	 | 
 
 
	
		
		X4anco 
 
 
		
			Member 
			
			
			
 
			
	Posts: 157 
	Threads: 66 
	Joined: Apr 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Script ERROR need help N00B 
			 
			
			
			
 
... 
			
				
(This post was last modified: 04-30-2011, 09:47 PM by X4anco.)
 
				
			 
		 |  
	 
 | 
 
	| 04-30-2011, 09:27 PM  | 
	
		
	 | 
 
 
	
		
		Kyle 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 911 
	Threads: 36 
	Joined: Sep 2010
	
 Reputation: 
7
		
	 | 
	
		
			
RE: Script ERROR need help N00B 
			 
			
				Please repeat your updated script file so I can see it.  
 (04-30-2011, 09:22 PM)NylePudding Wrote:  If I understand correctly you have made an extremely easy mistake to correct. 
 
playSoundAtEntity("", "unlock_door", "door_1", 0, false,); 
 
should be: playSoundAtEntity("", "unlock_door", "door_1", 0, false); 
 
You had a comma at the end of "false". 
 
C++ is annoying like that, hope it helps.   
I love C++ it always works nearly perfect for me.   
 
Nevermind, I found the problem.
 
You need to watch your capitalization and punctuation.
 
This: playSoundAtEntity("", "unlock_door", "door_1", 0, false,);
 
Is supposed to be this:
 
PlaySoundAtEntity("", "unlock_door", "door_1", 0, false);
			  
			
			
 
			
				
(This post was last modified: 04-30-2011, 10:20 PM by Kyle.)
 
				
			 
		 |  
	 
 | 
 
	| 04-30-2011, 10:15 PM  | 
	
		
	 | 
 
 
	
		
		X4anco 
 
 
		
			Member 
			
			
			
 
			
	Posts: 157 
	Threads: 66 
	Joined: Apr 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Script ERROR need help N00B 
			 
			
			
			
 
... 
			
				
(This post was last modified: 04-30-2011, 11:14 PM by X4anco.)
 
				
			 
		 |  
	 
 | 
 
	| 04-30-2011, 11:00 PM  | 
	
		
	 | 
 
 
	
		
		Tottel 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 307 
	Threads: 9 
	Joined: Nov 2010
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Script ERROR need help N00B 
			 
			
				Yes, that's what Nylepudding already told him 1 hour before you did.   
			 
			
			
			
		 |  
	 
 | 
 
	| 04-30-2011, 11:34 PM  | 
	
		
	 | 
 
 
	
		
		Simpanra 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 314 
	Threads: 28 
	Joined: Mar 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Script ERROR need help N00B 
			 
			
				Try This; 
 
 
void OnStart() 
{ 
AddUseItemCallback ("", "Corridor_Key", "door_1", "UsedKeyOnDoor", true); 
} 
void UsedKeyOnDoor (string &in asItem, string &in asEntity) 
{ 
SetSwingDoorLocked("door_1", false, true); 
PlaySoundAtEntity("", "unlock_door", "door_1", 0, false); 
RemoveItem("Corridor_key"); 
} 
 
 
And also, go in your editor and rename "Corridor Key" to "Corridor_Key"    
 
I am sure if you do exactly this it will work =)
			 
			
			
			
		 |  
	 
 | 
 
	| 04-30-2011, 11:49 PM  | 
	
		
	 | 
 
 
	
		
		Kyle 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 911 
	Threads: 36 
	Joined: Sep 2010
	
 Reputation: 
7
		
	 | 
	
		
			
RE: Script ERROR need help N00B 
			 
			
				 (04-30-2011, 11:34 PM)Tottel Wrote:  Yes, that's what Nylepudding already told him 1 hour before you did.   
If you notice, sir, Nye forgot to capitalize the first letter.
			  
			
			
 
			
		 |  
	 
 | 
 
	| 04-30-2011, 11:56 PM  | 
	
		
	 | 
 
 
	
		
		Karai16 
 
 
		
			Member 
			
			
			
 
			
	Posts: 164 
	Threads: 24 
	Joined: Apr 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Script ERROR need help N00B 
			 
			
				void OnStart() 
{ 
    AddUseItemCallback("", "RoomKey", "RoomDoor", "UsedKeyOnDoor", true); 
} 
 
void UsedKeyOnDoor(string &in asItem, string&in asEntity) 
{ 
    SetSwingDoorLocked("RoomDoor", false, true); 
    PlaySoundAtEntity("", "unlock_door", "RoomDoor", 0, false); 
    RemoveItem("RoomKey"); 
}
 This is my code of my test map. It has a UsedKeyOnDoor code. My code is working, so you can compare and see if there are any mistakes.
  
			 
			
			
 
Custom stories: 
Her Games (100% Complete) 
Her Games, All Bugs Fixed (100% Complete) 
 
			
		 |  
	 
 | 
 
	| 05-01-2011, 01:03 AM  | 
	
		
	 | 
 
 
	 
 |