Error when I add a memento - 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: Error when I add a memento (/thread-24585.html) |
Error when I add a memento - Coolfromdah00d - 02-10-2014 I'm trying to make a memento happen when I enter an area, but when I start the level, the description is not showed, none of the notes work and it gives me the error message (it gives me this message after I added the CallbackFunc on AreaMemento). I am not new to coding but I just can't seem to find the error... Here's my english_lang file <LANGUAGE> <CATEGORY Name="CustomStoryMain"> <Entry Name="Description">Texthere</Entry> </CATEGORY> </CATEGORY Name="Journal"> <Entry Name="Quest_pickuplantern_Text"> This could be useful...</Entry> <Entry Name="Quest_enterarea_Text"> Where am I...? </Entry> </CATEGORY> <CATEGORY Name="Journal"> <Entry Name="Note_note01_Name">texthere</Entry> <Entry Name="Note_note01_Text">texthere </Entry> </CATEGORY> <CATEGORY Name="Journal"> <Entry Name="Note_note02_Name">texthere</Entry> <Entry Name="Note_note02_Text">texthere.</Entry> </CATEGORY> <CATEGORY Name="Inventory"> <Entry Name="ItemName_GuestRoomKey">texthere</Entry> <Entry Name="ItemDesc_GuestRoomKey">texthere</Entry> </CATEGORY> </LANGUAGE> (I shortended down my notes as they are very long) Here is my HPS file void OnStart() { AddUseItemCallback("Player", AreaMemento, "EventQuest", true, 1); SetEntityCallbackFunc("GuestRoomKey", "jump"); AddUseItemCallback("", "GuestRoomKey", "door01", "UsedKeyOnDoor", false); } void UsedKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked(asEntity, false, true); PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false); RemoveItem(asItem); } void jump(string &in asEntity, string &in type) { SetEntityActive("corpse01", true); PlaySoundAtEntity("", "21_screams.snt", "corpse01", 0, true); StartScreenShake(0.5f, 1, 0, 0.25); GiveSanityDamage(5.0f, true); } void PickUpLantern(string &in asEntity, string &in type) { AddQuest("lantern", "pickuplantern"); } void EventQuest(string& in asParent, string& in asChild, int alState) { AddQuest("area", "enterarea"); } Sorry for my bad english. English is not my mother tounge. Thank you I haven't forgotten to name my area "AreaMemento" and neither did I forget to name the lantern "PickUpLantern" in the callbackFunc RE: Error when I add a memento - Traggey - 02-12-2014 Wrong forum, moved to development supprt! :3 RE: Error when I add a memento - GrAVit - 02-12-2014 AddUseItemCallback? I think you mean: AddEntityCollideCallback(string& asParentName, string& asChildName, string& asFunction, bool abDeleteOnCollide, int alStates); AreaMemento should also be quoted. Also, you don't need to have a new Journal category for each note. One is enough, for all of the Journal .lang entries. RE: Error when I add a memento - Mudbill - 02-12-2014 This has already been solved. This is a duplicate thread of this one. So I guess it should be removed? |