![]() |
** SOLVED ** Fatal Error when loading Custom Story? - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: ** SOLVED ** Fatal Error when loading Custom Story? (/thread-21342.html) |
** SOLVED ** Fatal Error when loading Custom Story? - FurtherGames - 04-30-2013 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"); } RE: Fatal Error when loading Custom Story? - Tomato Cat - 05-01-2013 Remove that extra comma? PHP Code: AddUseItemCallback("", "key_laboratory_1", "mansion_3", "FUNCTION", true,); RE: Fatal Error when loading Custom Story? - PutraenusAlivius - 05-01-2013 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. RE: Fatal Error when loading Custom Story? - FurtherGames - 05-01-2013 (05-01-2013, 03:54 AM)Mr Credits Wrote: Remove that extra comma? ---------------------------------------------------------------------- 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> |