| 
		
	
		| Zaffre   Posting Freak
 
 Posts: 867
 Threads: 50
 Joined: Jul 2012
 Reputation: 
30
 | 
			| RE: Problem with "extra_english.lang" 
 
				Okay. This is how your .hps file should look. We'll presume your door's ID is mansion_1.
 void OnStart()
 {
 SetEntityPlayerInteractCallback("mansion_1", "DoorLockedMessage", true);
 }
 
 void DoorLockedMessage(string &in entity)
 {
 SetMessage("Messages", "lockeddoor", 0);
 }
 
 This makes it so that when you interact with the swing door, it will display a message stating that the door is locked. The message will not be displayed again.
 
 As of September 2nd, 2014, I've left the Frictional forums. Check my profile for more details. |  |  
	| 09-03-2012, 04:20 PM |  |  
	
		| Frodos   Junior Member
 
 Posts: 28
 Threads: 7
 Joined: Sep 2012
 Reputation: 
0
 | 
			| RE: Problem with "extra_english.lang" 
 
				Sigh, I've tried all your advice and more and it still doesn't work! I'm so disappointed with myself, I feel like I'm letting you all down. I think we'll try one more time and if it doesn't work that's okay, you all have done enough already.
 I'm going to give you all the info, hopefully someone will find the problem.
 
 Name of Door: roomone
 Active: Yes
 CastShadows:Yes
 StaticPhysics:No
 IsAffectedbyDecal:No
 
 PlayerInteractCallback: DoorLockedPlayer
 
 PlayerInteractCallBackAutoRemove: Yes
 Locked: Yes
 
 OpenAmount: 0
 
 
 extra_english.lang:
 
 
 
 <LANGUAGE>
 <CATEGORY Name="Messages">
 <Entry Name="lockeddoor">The door is locked from the outside, maybe there is another way out of here.</Entry>
 </CATEGORY>
 </LANGUAGE>
 
 hps file:
 
 
 
 void OnStart()
 {
 SetEntityPlayerInteractCallback("roomone", "DoorLockedPlayer", true);
 }
 
 void DoorLockedMessage(string &in entity)
 {
 SetMessage("Messages", "lockeddoor", 0);
 }
 
 
 note: There is one other thing in english_Lang, a code for a note message, which works fine.
 
 There is nothing else in hps other than the door code.
 
 Veteran Writer
 Need help with your CS plot? PM me!
 
 Noob Scripter, need help PM me.
 
 
 
 
 
 |  |  
	| 09-03-2012, 11:05 PM |  |  
	
		| Zaffre   Posting Freak
 
 Posts: 867
 Threads: 50
 Joined: Jul 2012
 Reputation: 
30
 | 
			| RE: Problem with "extra_english.lang" 
 
				I can't find anything; it should be working fine. Sorry I couldn't help you.
			 
 As of September 2nd, 2014, I've left the Frictional forums. Check my profile for more details. |  |  
	| 09-03-2012, 11:11 PM |  |  
	
		| Frodos   Junior Member
 
 Posts: 28
 Threads: 7
 Joined: Sep 2012
 Reputation: 
0
 | 
			| RE: Problem with "extra_english.lang" 
 
				That's okay, thanks.
 If anyone knows the reason this hasn't been working please help.
 
 Veteran Writer
 Need help with your CS plot? PM me!
 
 Noob Scripter, need help PM me.
 
 
 
 
 
 
				
(This post was last modified: 09-04-2012, 02:55 AM by Frodos.)
 |  |  
	| 09-03-2012, 11:13 PM |  |  
	
		| FlawlessHappiness   Posting Freak
 
 Posts: 3,980
 Threads: 145
 Joined: Mar 2012
 Reputation: 
171
 | 
			| RE: Problem with "extra_english.lang" 
 
				 (09-03-2012, 11:05 PM)Frodos Wrote:  void OnStart(){
 SetEntityPlayerInteractCallback("roomone", "DoorLockedPlayer", true);
 }
 
 void DoorLockedMessage(string &in entity)
 {
 SetMessage("Messages", "lockeddoor", 0);
 }
 How about the bold words?    You function and the function you call has to be the same. You cannot call DoorLockedPlayer, and then change the name to DoorLockedMessage. 
 
Do i get cookie?    
 Trying is the first step to success. |  |  
	| 09-04-2012, 07:13 AM |  |  
	
		| Frodos   Junior Member
 
 Posts: 28
 Threads: 7
 Joined: Sep 2012
 Reputation: 
0
 | 
			| RE: Locked Door Message not Working, Help Needed. (Awarding Virtual Cookie) 
 
				It didn't work Beecake, sorry, you'll still get a cookie though.
 Still looking for an answer.
 
 Veteran Writer
 Need help with your CS plot? PM me!
 
 Noob Scripter, need help PM me.
 
 
 
 
 
 |  |  
	| 09-04-2012, 11:31 PM |  |  
	
		| Kazakarumariou   An angry man.
 
 Posts: 283
 Threads: 8
 Joined: Jul 2012
 Reputation: 
14
 | 
			| RE: Locked Door Message not Working, Help Needed. (Awarding Virtual Cookie) 
 
				void OnStart();{
 SetEntityCallbackFunc("roomone", "DoorLockedMessage");
 
 }
 
 
 
 
 void DoorLockedMessage(string &in asItem, string &in asEntity)
 {
 SetMessage("Messages", "lockeddoor", 0);
 }
 
 ------------
 Try dat
 |  |  
	| 09-04-2012, 11:41 PM |  |  
	
		| Frodos   Junior Member
 
 Posts: 28
 Threads: 7
 Joined: Sep 2012
 Reputation: 
0
 | 
			| RE: Locked Door Message not Working, Help Needed. (Awarding Virtual Cookie) 
 
				 (09-04-2012, 11:41 PM)Harthex Wrote:  void OnStart();{
 SetEntityCallbackFunc("roomone", "DoorLockedMessage");
 
 }
 
 
 
 
 void DoorLockedMessage(string &in asItem, string &in asEntity)
 {
 SetMessage("Messages", "lockeddoor", 0);
 }
 
 ------------
 Try dat
 Okay I tried that and got a fatal error. 
 
FATAL ERROR: Could not load script file 'custom stories/Nightmare of a Child/maps/ch01/childnightmare.hps'! main (2,1) : ERR : Unexpected token '{'
			 
 Veteran Writer
 Need help with your CS plot? PM me!
 
 Noob Scripter, need help PM me.
 
 
 
 
 
 |  |  
	| 09-05-2012, 12:15 AM |  |  
	
		| Statyk   Schrödinger's Mod
 
 Posts: 4,390
 Threads: 72
 Joined: Sep 2011
 Reputation: 
241
 | 
			| RE: Locked Door Message not Working, Help Needed. (Awarding Virtual Cookie) 
 
				Here's the whole setup:
 Name of Door: roomone
 Active: Yes
 CastShadows:Yes
 StaticPhysics:No
 IsAffectedbyDecal:No
 PlayerInteractCallback: DoorLockedMessage
 PlayerInteractCallBackAutoRemove: Yes
 Locked: Yes
 OpenAmount: 0
 
 
 extra_english.lang
 
 <LANGUAGE>
 
 <CATEGORY Name="Messages">
 <Entry Name="lockeddoor">The door is locked from the outside, maybe there is another way out of here.</Entry>
 </CATEGORY>
 
 </LANGUAGE>
 
 
 
 HPS:
 
 void OnStart()
 {
 //NOTHING. The callback is already set on the door in the level editor
 }
 
 void DoorLockedMessage(string &in asEntity)
 {
 SetMessage("Messages", "lockeddoor", 0);
 }
 
				
(This post was last modified: 09-05-2012, 12:28 AM by Statyk.)
 |  |  
	| 09-05-2012, 12:17 AM |  |  
	
		| Kazakarumariou   An angry man.
 
 Posts: 283
 Threads: 8
 Joined: Jul 2012
 Reputation: 
14
 | 
			| RE: Locked Door Message not Working, Help Needed. (Awarding Virtual Cookie) 
 
				 (09-05-2012, 12:15 AM)Frodos Wrote:   (09-04-2012, 11:41 PM)Harthex Wrote:  void OnStart();Okay I tried that and got a fatal error.{
 SetEntityCallbackFunc("roomone", "DoorLockedMessage");
 
 }
 
 
 
 
 void DoorLockedMessage(string &in asItem, string &in asEntity)
 {
 SetMessage("Messages", "lockeddoor", 0);
 }
 
 ------------
 Try dat
 
 FATAL ERROR: Could not load script file 'custom stories/Nightmare of a Child/maps/ch01/childnightmare.hps'! main (2,1) : ERR : Unexpected token '{'
 void OnStart() 
 
Oops I added ; at the end of onstartlol
			 |  |  
	| 09-05-2012, 12:48 AM |  |  |