The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error when I try to add a memento
Coolfromdah00d Offline
Junior Member

Posts: 38
Threads: 5
Joined: Mar 2013
Reputation: 0
#1
Error when I try to add a memento

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");
}

I haven't forgotten to name my area "AreaMemento" and neither did I forget to name the lantern "PickUpLantern" in the callbackFunc

Sorry for my bad english. English is not my mother tounge.

Thank you
02-10-2014, 01:23 PM
Find


Messages In This Thread
Error when I try to add a memento - by Coolfromdah00d - 02-10-2014, 01:23 PM



Users browsing this thread: 2 Guest(s)