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
** SOLVED ** Fatal Error when loading Custom Story?
FurtherGames Offline
Member

Posts: 72
Threads: 23
Joined: Apr 2013
Reputation: 1
#1
Wink  ** SOLVED ** Fatal Error when loading Custom Story?

Hello, I've started to create a custom story, I just did a key to unlock a door, but whenever I try to load the map this error comes up:

FATAL ERROR: Could not load script file 'custom_stories/Razors/maps/01.Motel.hps'!
main (3, 78) : ERR : Expected expression value



Here is my HPS File for that map;

void OnStart()
{
AddUseItemCallback("", "key_laboratory_1", "mansion_3", "FUNCTION", true,);
}

void OnEnter()
{

}

void OnLeave()
{

}

void FUNCTION(string &in item, string &in door)
{
SetLevelDoorLocked("mansion_3", false);
PlayGuiSound("unlock.door.snt", 100);
RemoveItem("key_laboratory_1");
}
(This post was last modified: 05-01-2013, 12:16 PM by FurtherGames.)
04-30-2013, 09:51 PM
Find
Tomato Cat Offline
Senior Member

Posts: 287
Threads: 2
Joined: Sep 2012
Reputation: 20
#2
RE: Fatal Error when loading Custom Story?

Remove that extra comma?

PHP Code: (Select All)
AddUseItemCallback("""key_laboratory_1""mansion_3""FUNCTION"true,); 
05-01-2013, 03:54 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#3
RE: Fatal Error when loading Custom Story?

void OnStart()
{
AddUseItemCallback("", "key_laboratory_1", "mansion_3", "FUNCTION", true,);
}

void OnEnter()
{

}

void OnLeave()
{

}

void FUNCTION(string &in item, string &in door)
{
SetLevelDoorLocked("mansion_3", false);
PlayGuiSound("unlock.door.snt", 100);
RemoveItem("key_laboratory_1");
}

Remove that.

"Veni, vidi, vici."
"I came, I saw, I conquered."
05-01-2013, 05:50 AM
Find
FurtherGames Offline
Member

Posts: 72
Threads: 23
Joined: Apr 2013
Reputation: 1
#4
RE: Fatal Error when loading Custom Story?

(05-01-2013, 03:54 AM)Mr Credits Wrote: Remove that extra comma?

PHP Code: (Select All)
AddUseItemCallback("""key_laboratory_1""mansion_3""FUNCTION"true,); 

----------------------------------------------------------------------
Thanks, I figured it how this morning, but now the key doesn't unlock the door, my description has gone missing and there is a level door inside my map, when the player goes over to it, a message on screen saying "No need to go back outside..." it's supposed to come up. It did, but it doesn't any more. I also tried to create a name for the key but it's still just
"Picked up"

HPS FILE: (I know "masion_Door" is spelt wrong)

void OnStart()
{
AddUseItemCallback("item", "Key1", "masion_Door", "FUNCTION", true);
}

void OnEnter()
{

}

void OnLeave()
{

}
void FUNCTION(string &in item, string &in door)
{
SetLevelDoorLocked("masion_Door", false);
PlayGuiSound("unlock.door.snt", 100);
RemoveItem("item");
}


English.lang file:

<LANGUAGE>
<RESOURCES>
</RESOURCES>

<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">Dare to enter the castle tombs...</Entry>
</CATEGORY>
<CATEGORY Name="Messages">
<Entry Name="doorlock1">No need to go back outside...</Entry>
</CATEGORY>
<CATEGORY Name="Inventory">
<Entry Name="ItemName_Key1>room key</Entry>
<Entry Name="ItemDesc_Key1">The key for my room.</Entry>
</CATERGORY>

</LANGUAGE>
05-01-2013, 12:08 PM
Find




Users browsing this thread: 1 Guest(s)