Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Keys opening doors
RangerEDinc Offline
Junior Member

Posts: 6
Threads: 2
Joined: Jun 2011
Reputation: 0
#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
RawkBandMan Offline
Posting Freak

Posts: 1,146
Threads: 35
Joined: Nov 2010
Reputation: 5
#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
RangerEDinc Offline
Junior Member

Posts: 6
Threads: 2
Joined: Jun 2011
Reputation: 0
#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
WatzUpzPeepz Offline
Member

Posts: 106
Threads: 12
Joined: May 2011
Reputation: 0
#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
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#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
RangerEDinc Offline
Junior Member

Posts: 6
Threads: 2
Joined: Jun 2011
Reputation: 0
#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




Users browsing this thread: 1 Guest(s)