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");
}
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.
(05-01-2013, 03:54 AM)Mr Credits Wrote: [ -> ]Remove that extra comma?
PHP Code:
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>