Your Computer 
 
 
		
			SCAN ME! 
			
			
			
 
			
	Posts: 3,456 
	Threads: 32 
	Joined: Jul 2011
	
 Reputation: 
235
		
	 | 
	
		
			
RE: Key 
			 
			
				 (02-01-2012, 07:36 PM)Saren Wrote:  Right.... 
"Still nothing" implies you're getting the same error. Putting quotes around what otherwise would have been a variable name (which hasn't been declared) makes it a string. Therefore does away with the error message. If it still gives you the same error message, then you forgot to save the changes or didn't place quotes (properly).
Quote:Great... now it said something about a ; .... Maybe missing, 1 too much.. I dunno...  
What's your new code?
			  
			
			
 
			
				
(This post was last modified: 02-01-2012, 07:40 PM by Your Computer.)
 
				
			 
		 |  
	 
 | 
 
	| 02-01-2012, 07:39 PM  | 
	
		
	 | 
 
 
	
		
		Saren 
 
 
		
			Member 
			
			
			
 
			
	Posts: 196 
	Threads: 20 
	Joined: Jan 2012
	
 Reputation: 
1
		
	 | 
	
		
			
RE: Key 
			 
			
				 (02-01-2012, 07:39 PM)Your Computer Wrote:  What's your new code? // Run when entering map 
void OnEnter() 
{ 
AddUseItemCallback("", "Masterbedroomkey", "masterbedroomdoor", "UsedKeyOnDoor", true); 
}
 
void KeyOnDoor(string &in asItem, string &in asEntity) 
{ 
SetSwingDoorLocked("masterbedroomdoor", false, true); 
UsedPlaySoundAtEntity("", "unlock_door", "masterbedroomdoor", 0, false); 
"RemoveItem"(Masterbedroomkey); 
}
 
//////////////////////////// 
// Run when leaving map 
void OnLeave() 
{
 
}
			  
			
			
			
		 |  
	 
 | 
 
	| 02-01-2012, 08:34 PM  | 
	
		
	 | 
 
 
	
		
		SilentStriker 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 950 
	Threads: 26 
	Joined: Jul 2011
	
 Reputation: 
43
		
	 | 
	
		
			
RE: Key 
			 
			
				You have done it wrong. it should look like this RemoveItem("Masterbedroomkey");
			 
			
			
 
			
		 |  
	 
 | 
 
	| 02-01-2012, 08:37 PM  | 
	
		
	 | 
 
 
	
		
		Your Computer 
 
 
		
			SCAN ME! 
			
			
			
 
			
	Posts: 3,456 
	Threads: 32 
	Joined: Jul 2011
	
 Reputation: 
235
		
	 | 
	
		
			
RE: Key 
			 
			
				I think you need to look at post #6 again. 
 
Ninja'd.
			 
			
			
 
			
				
(This post was last modified: 02-01-2012, 08:38 PM by Your Computer.)
 
				
			 
		 |  
	 
 | 
 
	| 02-01-2012, 08:38 PM  | 
	
		
	 | 
 
 
	
		
		Saren 
 
 
		
			Member 
			
			
			
 
			
	Posts: 196 
	Threads: 20 
	Joined: Jan 2012
	
 Reputation: 
1
		
	 | 
	
		
			
RE: Key 
			 
			
				Lol omg..... xD 
  
Yaaaay another problem =D 
No matching signatures to 'UsedPlaySoundAtEntity(String@&, string@&, const unit, const bool)2 
Whatever the hell that means... lol 
			
			
			
			
				
(This post was last modified: 02-01-2012, 09:14 PM by Saren.)
 
				
			 
		 |  
	 
 | 
 
	| 02-01-2012, 09:05 PM  | 
	
		
	 | 
 
 
	
		
		Your Computer 
 
 
		
			SCAN ME! 
			
			
			
 
			
	Posts: 3,456 
	Threads: 32 
	Joined: Jul 2011
	
 Reputation: 
235
		
	 | 
	
		
			
RE: Key 
			 
			
				 (02-01-2012, 09:05 PM)Saren Wrote:  Yaaaay another problem =D 
No matching signatures to 'UsedPlaySoundAtEntity(String@&, string@&, const unit, const bool)2 
Whatever the hell that means... lol 
It means the function doesn't exist, which it doesn't. The actual function is PlaySoundAtEntity.
			  
			
			
 
			
		 |  
	 
 | 
 
	| 02-01-2012, 09:37 PM  | 
	
		
	 | 
 
 
	
		
		Saren 
 
 
		
			Member 
			
			
			
 
			
	Posts: 196 
	Threads: 20 
	Joined: Jan 2012
	
 Reputation: 
1
		
	 | 
	
		
			
RE: Key 
			 
			
				 (02-01-2012, 09:37 PM)Your Computer Wrote:   (02-01-2012, 09:05 PM)Saren Wrote:  Yaaaay another problem =D 
No matching signatures to 'UsedPlaySoundAtEntity(String@&, string@&, const unit, const bool)2 
Whatever the hell that means... lol  
It means the function doesn't exist, which it doesn't. The actual function is PlaySoundAtEntity. Yea, I was thinking about removing that... but I was'nt sure.. thx dude
 
 
My story works now... but my key dose'nt
			  
			
			
			
				
(This post was last modified: 02-01-2012, 10:07 PM by Saren.)
 
				
			 
		 |  
	 
 | 
 
	| 02-01-2012, 09:43 PM  | 
	
		
	 | 
 
 
	
		
		Your Computer 
 
 
		
			SCAN ME! 
			
			
			
 
			
	Posts: 3,456 
	Threads: 32 
	Joined: Jul 2011
	
 Reputation: 
235
		
	 | 
	
		
			
RE: Key 
			 
			
				 (02-01-2012, 09:43 PM)Saren Wrote:  My story works now... but my key dose'nt 
Replace your KeyOnDoor function with this:
 void UsedKeyOnDoor(string &in asItem, string &in asEntity) {     SetSwingDoorLocked(asEntity, false, true);     PlaySoundAtEntity("", "unlock_door", asEntity, 0, false);     RemoveItem(asItem); } 
 
   
			 
			
			
 
			
		 |  
	 
 | 
 
	| 02-01-2012, 10:14 PM  | 
	
		
	 | 
 
 
	
		
		Saren 
 
 
		
			Member 
			
			
			
 
			
	Posts: 196 
	Threads: 20 
	Joined: Jan 2012
	
 Reputation: 
1
		
	 | 
	
		
			
RE: Key 
			 
			
				I think it worked but.... my key dose'nt have a name.... it just says Picked Up..... might have failed at something in the extra_english file as well.. lol, would'nt surprise me 
<LANGUAGE> 
<CATEGORY Name="CustomStoryMain"> 
<Entry Name="Description">escription">You are Dr. Alexandrov. A very famous rich Russian doctor who is trying to make war easier for the Russian army.</Entry> 
</CATEGORY> 
 
<CATEGORY Name="Journal"> 
<Entry Name="Note_note1_Name">Experiment Report</Entry> 
<Entry Name="Note_note1_Text">The experiments are going well dr. We've almost completed the first attempt of a mindless soldier but we still have to find a way to make it follow your orders. 
<Entry Name="Note_note2_Name">Failure!</Entry> 
<Entry Name="Note_note2_Text">Dr! The experiment has gone wrong! It's lose, don't have much time... I can hear it's footsteps outside the door, don't think it knows I'm here... Yet. I've putted the key to the cellar in the drawers. Hurry dr. 
</CATEGORY> 
 
<CATEGORY Name="Inventory"> 
<Entry Name="ItemName_Masterbedroomkey">Master bedroom key</Entry> 
<Entry Name="ItemDesc_Masterbedroomkey">The key to my bedroom door.</Entry> 
<Entry Name="ItemName_Cellarkey">Cellar key</Entry> 
<Entry Name="ItemDesc_Cellarkey">This key will open the door to my cellar</Entry> 
<Entry Name="ItemName_Prisonkey">Prison key</Entry> 
<Entry Name="ItemDesc_Prisonkey">The key to the prison section in my mansion</Entry> 
</CATEGORY> 
 
<CATEGORY Name="Map1"> 
<Entry Name="Masterbedroomdoor">Locked. I need to find the key.</Entry> 
<Entry Name="InteractDoorHaveKey">Use the key on the door to unlock it.</Entry> 
</CATEGORY> 
 
</LANGUAGE> 
 
Anyone?
			 
			
			
			
				
(This post was last modified: 02-02-2012, 12:06 PM by Saren.)
 
				
			 
		 |  
	 
 | 
 
	| 02-01-2012, 10:45 PM  | 
	
		
	 | 
 
 
	 
 |