Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Keys opening doors
Author Message
RangerEDinc Offline
Junior Member

Posts: 6
Joined: Jun 2011
Reputation: 0
Post: #1
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
Find all posts by this user Quote this message in a reply
XxRoCkBaNdMaNxX Offline
Posting Freak

Posts: 1,119
Joined: Nov 2010
Reputation: 5
Post: #2
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
Find all posts by this user Quote this message in a reply
RangerEDinc Offline
Junior Member

Posts: 6
Joined: Jun 2011
Reputation: 0
Post: #3
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
Find all posts by this user Quote this message in a reply
WatzUpzPeepz Offline
Member

Posts: 106
Joined: May 2011
Reputation: 0
Post: #4
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
Find all posts by this user Quote this message in a reply
Roenlond Offline
Senior Member

Posts: 331
Joined: Apr 2011
Reputation: 0
Post: #5
RE: Keys opening doors
void UsedKeyOnDoor(string &in asItem, string &in asEntity

You forgot an end bracket.
06-08-2011 04:55 PM
Find all posts by this user Quote this message in a reply
RangerEDinc Offline
Junior Member

Posts: 6
Joined: Jun 2011
Reputation: 0
Post: #6
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
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)