Error when testing my map - 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 (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: Error when testing my map (/thread-6691.html) |
Error when testing my map - Raymond - 02-23-2011 //////////////////////////// // Run when entering map void OnEnter() { AddUseItemCallback("", "prisonkey_1", "mansion_3", "UsedKeyOnDoor", true); } void UsedKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("mansion_3", false, true); PlaySoundAtEntity("", "unlock_door", "mansion_3", 0, false); RemoveItem("prisonkey_1"); } //////////////////////////// // Run when leaving map void OnLeave() { } void OnStart() { AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1" , true , 1); } void MonsterFunc1(string &in asParent , string &in asChild , int alState) { SetEntityActive("servant_grunt_1" , true); I got an error said: "FATAL ERROR: Could not load script file 'custom_stories/My First Story/maps/Test.hps! main (27,45):ERR :Unexpected end of file" Someone please help! RE: Error when testing my map - Vradcly - 02-23-2011 void MonsterFunc1(string &in asParent , string &in asChild , int alState) { SetEntityActive("servant_grunt_1" , true); you need a } here RE: Error when testing my map - Raymond - 02-23-2011 (02-23-2011, 12:32 PM)Vradcly Wrote: void MonsterFunc1(string &in asParent , string &in asChild , int alState) It's fixed, thanks! RE: Error when testing my map - Raymond - 02-24-2011 <LANGUAGE> <RESOURCES> </RESOURCES <CATEGORY Name="CustomStoryMain"> <Entry Name="Description">Escape the castle!.</Entry> </CATEGORY> <CATEGORY Name="Inventory"> <Entry Name="ItemName_PrisonKey">Prison Key</Entry> <Entry Name="ItemDesc_PrisonKey">Key to unlock the door to prison. </CATEGORY> <CATEGORY Name="Journal"> <Entry Name="Note_hotel_1_Name">Hotel Room</Entry> <Entry Name="Note_hotel_1_Text">Test</Entry> </CATEGORY> </LANGUAGE> I got another problem, my note still don't have words, i try and try still don't have words, the description doesn't have words either, please help! RE: Error when testing my map - Selyp - 02-24-2011 (02-24-2011, 10:06 AM)Raymond Wrote: <LANGUAGE> you forgot the /entry after the prison key desc. RE: Error when testing my map - Raymond - 02-24-2011 (02-24-2011, 10:29 AM)Selyp Wrote:(02-24-2011, 10:06 AM)Raymond Wrote: <LANGUAGE> Still didt'n work RE: Error when testing my map - Vradcly - 02-24-2011 what did you write on in the properties of the note? I know some ppl write the entire Note_hotel_1_Name so if you did, notice that it should be just hotel_1 RE: Error when testing my map - Nye - 02-24-2011 You need to change the sound name "unlock_door" to "unlock_door.snt". Like this: //////////////////////////// // Run when entering map void OnEnter() { AddUseItemCallback("", "prisonkey_1", "mansion_3", "UsedKeyOnDoor", true); } void UsedKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("mansion_3", false, true); PlaySoundAtEntity("", "unlock_door.snt", "mansion_3", 0, false); RemoveItem("prisonkey_1"); } //////////////////////////// // Run when leaving map void OnLeave() { } void OnStart() { AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1" , true , 1); } void MonsterFunc1(string &in asParent , string &in asChild , int alState) { I mean, I imagine that there is no sound when you unlock the door without that Also, for adding journal entries and notes, follow this tutorial: http://wiki.frictionalgames.com/hpl2/tutorials/script/howtomakenotes RE: Error when testing my map - Raymond - 02-24-2011 (02-24-2011, 11:04 AM)Vradcly Wrote: what did you write on in the properties of the note? My note's name is "hotel_1" and i write CH01L01 in the NoteText from the Entity Tab, and my .lang file is like this: <Entry Name="hotel_1_Name">Hotel Room"</Entry> <Entry Name="hotel_1_Text">Test</Entry> RE: Error when testing my map - Vradcly - 02-24-2011 its supposed to be hotel_1 in Notetext field in entity tab . |