| RangerEDinc   Junior Member
 
 Posts: 6
 Threads: 2
 Joined: Jun 2011
 Reputation: 
0
 | 
			| Keys opening doors 
 
				So I am building a custom story and ive ran across a problem, i have tried to get everything working, im following a tutorial from youtube and everything goes well until the end. When i load up my save it gives me this error message due to the .hps file that I edited. Here is the error message.
 FATAL ERROR: Could not load script file 'custom_stories/First Story/maps/entrymap.hps'!
 main (27,2) :ERR :Unexpected end of file
 
 Please help so i can continue with my custom story =)
 
 
 
 |  | 
	| 06-04-2011, 11:49 PM |  | 
	
		| RawkBandMan   Posting Freak
 
 Posts: 1,146
 Threads: 35
 Joined: Nov 2010
 Reputation: 
5
 | 
			| RE: Keys opening doors 
 
				Post your entrymap.hps file here.
			 
 I've come to learn to not fear the living, nor the dead... But the monsters that hide in closets. 
 |  | 
	| 06-05-2011, 04:56 AM |  | 
	
		| RangerEDinc   Junior Member
 
 Posts: 6
 Threads: 2
 Joined: Jun 2011
 Reputation: 
0
 | 
			| RE: Keys opening doors 
 
				////////////////////////////// Run first time starting map
 void OnStart()
 {
 AddUseItemCallback("", "ClosetKey_1", "mansion_1", "UsedKeyOnDoor", true);
 }
 
 void UsedKeyOnDoor(string &in asItem, string &in asEntity
 {
 SetSwingDoorLocked("mansion_1", false, true);
 PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
 RemoveItem("ClosetKey_1");
 }
 ////////////////////////////
 // Run when entering map
 void OnEnter()
 {
 
 }
 
 ////////////////////////////
 // Run when leaving map
 void OnLeave()
 {
 
 }
 |  | 
	| 06-08-2011, 04:36 AM |  | 
	
		| WatzUpzPeepz   Member
 
 Posts: 106
 Threads: 12
 Joined: May 2011
 Reputation: 
0
 | 
			| RE: Keys opening doors 
 
				Well I can't see the problem but remove the voidOnLeave and on enter voids,you dont need them for the basic script you have posted. I counted the lines and I think the error is comming from the voidOnLeave so remove it.
			 
 |  | 
	| 06-08-2011, 01:38 PM |  | 
	
		| Roenlond   Senior Member
 
 Posts: 331
 Threads: 3
 Joined: Apr 2011
 Reputation: 
0
 | 
			| RE: Keys opening doors 
 
				void UsedKeyOnDoor(string &in asItem, string &in asEntity
 You forgot an end bracket.
 |  | 
	| 06-08-2011, 04:55 PM |  | 
	
		| RangerEDinc   Junior Member
 
 Posts: 6
 Threads: 2
 Joined: Jun 2011
 Reputation: 
0
 | 
			| RE: Keys opening doors 
 
				Ok it loads now, but the door i want locked (mansion_1) isnt locked, but i can still use the key with the door. Help..again?
			 |  | 
	| 06-08-2011, 06:26 PM |  |