Frictional Games Forum (read-only)

Full Version: Error when I add a memento
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Wrong forum, moved to development supprt! :3
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.
This has already been solved. This is a duplicate thread of this one.

So I guess it should be removed?