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
Solved mansion1.hps FATAL ERROR
Author Message
Victor Offline
Member

Posts: 83
Joined: Oct 2011
Reputation: 2
Post: #1
mansion1.hps FATAL ERROR
I'm a noooooooooooooooobie in scripting and 'customstoryng", and this is my 5th attempt to make a key work in a door (yes, I am THAT noobie). I've watched several tutorials and followed them correctly, but I can't start my custom story. If I try to start it, the game crashes and a window with the following words pops up:

"FATAL ERROR: Could not load script file 'custom_stories/hello/maps/mansion1.hps(mansion1 is the name of the .map file too)!' main (27,2): ERR : Unexpected end of file"

In the .hps file is like this:

////////////////////////////
// Run first time starting map
void OnStart()
{
void AddUseItemCallback("", "keymansion1, "mansion1", "KeyOnDoor", true);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion1", 0, false)
RemoveItem("keymansion1");
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

I just copied this from the tutorial and added the codes to make the key work (like in the youtube tutorials I've been watching).
Please, can you guys HELP ME?
(This post was last modified: 01-08-2013 04:25 PM by Victor.)
10-17-2011 10:39 PM
Find all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,236
Joined: Jul 2011
Reputation: 216
Post: #2
RE: mansion1.hps FATAL ERROR
The string keymansion1 is not properly closed.

Tutorials: From Noob to Pro
10-17-2011 10:42 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Victor Offline
Member

Posts: 83
Joined: Oct 2011
Reputation: 2
Post: #3
RE: mansion1.hps FATAL ERROR
(10-17-2011 10:42 PM)Your Computer Wrote:  The string keymansion1 is not properly closed.
THANKS A LOT Big Grin
10-17-2011 11:00 PM
Find all posts by this user Quote this message in a reply
LowFire3 Offline
Junior Member

Posts: 26
Joined: Dec 2010
Reputation: 1
Post: #4
RE: mansion1.hps FATAL ERROR
PlaySoundAtEntity("", "unlock_door", "mansion1", 0, false); <--- you forgot to put a semi-colon there.

[Image: at_7728609.png]
10-17-2011 11:00 PM
Find all posts by this user Quote this message in a reply
Victor Offline
Member

Posts: 83
Joined: Oct 2011
Reputation: 2
Post: #5
RE: mansion1.hps FATAL ERROR
Thanks to you too, but the FATAL ERROR window keeps showing up, and thos time is like this:

FATAL ERROR: Could not load script file 'custom_stories/Hello/maps/mansion1.hps'!
main(5,7) : ERR : Data type can't be 'void'
main(5,25): ERR : Only objects have constructors
10-17-2011 11:05 PM
Find all posts by this user Quote this message in a reply
LowFire3 Offline
Junior Member

Posts: 26
Joined: Dec 2010
Reputation: 1
Post: #6
RE: mansion1.hps FATAL ERROR
void AddUseItemCallback("", "keymansion1, "mansion1", "KeyOnDoor", true);



Get rid of the "void"

[Image: at_7728609.png]
(This post was last modified: 10-17-2011 11:18 PM by LowFire3.)
10-17-2011 11:18 PM
Find all posts by this user Quote this message in a reply
Victor Offline
Member

Posts: 83
Joined: Oct 2011
Reputation: 2
Post: #7
RE: mansion1.hps FATAL ERROR
Thanks a lot, guys Big Grin

(Sorry about being a fridgin' noob, k?)
10-17-2011 11:32 PM
Find all posts by this user Quote this message in a reply
Juby Away
Senior Member

Posts: 285
Joined: May 2011
Reputation: 5
Post: #8
RE: mansion1.hps FATAL ERROR
(10-17-2011 11:32 PM)Victor Wrote:  (Sorry about being a fridgin' noob, k?)
Scripting comes with time and practice. I would suggest, however to read over your script a couple times before you post and if you truly cannot spot an error, then feel free to post about it. The reality is you learn the fastest by doing.

Forever passing judgement compared to a fraud.
10-18-2011 01:57 AM
Find all posts by this user Quote this message in a reply
Post Reply 




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