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 Message, doesn't specify what problem is
Rokotain Offline
Member

Posts: 54
Threads: 9
Joined: Jul 2011
Reputation: 0
#1
Brick  Error Message, doesn't specify what problem is

Hello Amnesia Gamers (and bronies!)
I'm sorry to bother you with my long list of help me! But in my defence, I've done the best I could trying to find out about this, before posting. I bother you guys as last resort : p

I have been working on the full version of my custom story again. And I've come to a problem I just don't get.
Looked trough the wiki, read guides, and searched a very long time on this forum, but no answers to it.

Problem 1.
The custom story works fine, until I enter my Studium Map.
The error message is as following:

[Image: fatalerror.png]


I can't seem to find the problem for it, and I'd prefer not to post my script as it contains spoilers and is very long. Although if I have to, I will. I'm not sure if you get much out of that ^ without the script.


Problem 2.
I have an "if" script. The goal is to activate area1, which activates area2, which execute a script if the player collides with it. Simple enough right?
Problem is that I want area1 to only execute the commando IF the player has the lantern.
This is the script so far:

void IfHasLantern(string &in asParent, string &in asChild, int alState)
{
    if(HasItem("lantern") == true)
        {
        SetEntityActive("AreaLookGrunt", true);
        }
}


It probably needs an else, but I don't know the line for DoNothing or something. I don't want it to do anything if the player doesn't have the lantern yet.

Problem 3.
I still haven't found out how a player can, by looking at a door, get a short message saying the name of the door, or the area the door leads too.

Example:
Player walks up to door1 leading to the kitchen.
The player holds the cursor over the door, about to open it, then a small text displays saying, "Kitchen Door".

It's the PlayerLookAt callback I believe, but I'm unfamiliar with that :/

Problem 4.
Maybe the worst of them all?
Notes, Mementos and Inventory Custom Item Name doesn't display anymore.
They used to before, and I don't know what has happend. For main game items it seems to work normally.
I also have checked that both my amnesia and custom story is set to english.
Any clues about this?
(This post was last modified: 12-31-2011, 08:44 PM by Rokotain.)
12-31-2011, 10:39 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: Error Message, doesn't specify what problem is

Problem 1


We need to see the script to help, sorry :/

Problem 2

I don't know much about IF statements sorry

Problem 3

I don't think it's PlayCallBack. I'm pretty sure it's a sign area. Go to scriptareas and on the dropdown box there is a option named Area. You will need to use extra_english.lang for this; again, sorry I haven't used this aswell.

Problem 4

You need to show us your extra_english.lang for us to help as well

12-31-2011, 10:54 AM
Find
Rokotain Offline
Member

Posts: 54
Threads: 9
Joined: Jul 2011
Reputation: 0
#3
RE: Error Message, doesn't specify what problem is

Thank you for answering what you did so far still :]

I will post it here, to make it less messy in the original post.
Also extremely sorry for such messy scripts, it only appears like this on the forum post : p

Studium.hps file

Quote:////////////////////////////////////
//Area Book - Begin

void BookMemento(string &in asParent, string &in asChild, int alState)
{
AddQuest("StudyBookMemento", "StudyBookMemento");
}

//Area Book - End
////////////////////////////////////


////////////////////////////////////
//Hammer Grunt - Begin

void HammerGruntActivate(string &in asEntity, string &in OnPickup)
{
SetEntityActive("hammergrunt", true);
AddEnemyPatrolNode("doorgrunt", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("doorgrunt", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("doorgrunt", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("doorgrunt", "PathNodeArea_14", 0, "");
AddEnemyPatrolNode("doorgrunt", "PathNodeArea_15", 0, "");
AddEnemyPatrolNode("doorgrunt", "PathNodeArea_16", 0, "");
AddEnemyPatrolNode("doorgrunt", "PathNodeArea_17", 0, "");
AddEnemyPatrolNode("doorgrunt", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("doorgrunt", "PathNodeArea_19", 0, "");
AddEnemyPatrolNode("doorgrunt", "PathNodeArea_20", 0, "");
}

void HammerCollide(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke("doorgrunt", true);
}

//Hammer Grunt - End
////////////////////////////////////


////////////////////////////////////
//Room Grunt - Begin

void GruntRoom(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("roomgrunt", true);
AddEnemyPatrolNode("roomgrunt", "PathNodeArea_1", 2, "");
AddEnemyPatrolNode("roomgrunt", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("roomgrunt", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("roomgrunt", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("roomgrunt", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("roomgrunt", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("roomgrunt", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("roomgrunt", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("roomgrunt", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("roomgrunt", "PathNodeArea_10", 0, "");
}

void RoomCollide(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke("roomgrunt", true);
}

//Room Grunt - End
////////////////////////////////////


////////////////////////////////////
//Study Door - Begin

void StudyDoorKeyOpen(string &in asItem, string &in asEntity)
{
PlaySoundAtEntity("unlocked", "Studydoor", asEntity, 0.0f, false);
SetSwingDoorLocked("Studydoor", false, true);
RemoveItem(asItem);
}

void StudyStorageKeyOpen(string &in asItem, string &in asEntity)
{
PlaySoundAtEntity("unlocked", "StudyStorageDoor", asEntity, 0.0f, false);
AddQuest("StudyStorageMemento", "StudyStorageMemento");
RemoveItem(asItem)
}

void StudyStorageHammerOpen(string &in asItem, string &in asEntity)
{
PlaySoundAtEntity("break_wood1", "StudyStorageDoor", asEntity, 0.0f, false);
SetPropHealth("StudyStorageDoor", 0.0f);
CompleteQuest("StudyStorageMemento", "StudyStorageMemento");
}

void KeyWorkOpen(string &in asItem, string &in asEntity)
{
PlaySoundAtEntity("unlocked", "door_work", asEntity, 0.0f, false);
RemoveItem(asItem)
}

void WoodenBoardHammerOpen(string &in asItem, string &in asEntity)
{
PlaySoundAtEntity("break_wood1", "wooden_boards_1", asEntity, 0.0f, false);
SetPropHealth("wooden_boards_1", 0.0f);
}

//Study Door - End
////////////////////////////////////


////////////////////////////////////
//Door Close - Begin

void DoorCloseEvent(string &in asEntity, string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("enabled01", "door_close", asEntity, 0.0f, false);
PlaySoundAtEntity("", "close_door.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
StartPlayerLookAt("door_close", 20, 50, "");
AddTimer("", 2, "TimerStopPlayerLook");
SetSwingDoorClosed("door_close", true, true);
AddQuest("DoorCloseMemento", "DoorCloseMemento");
SetEntityActive("AreaQuestComplete1", true);
}

void TimerStopPlayerLook(string &in asTimer)
{
StopPlayerLookAt();
}

//Door Close - End
////////////////////////////////////


////////////////////////////////////
//Quest - Begin

void Quest1(string &in asParent, string &in asChild, int alState)
{
CompleteQuest("StudyLevelDoor", "StudyLevelDoor");
}

//Quest - End
////////////////////////////////////


////////////////////////////////////
//Secret Shelf - Begin

void SecretShelfFunction(string &in asEntity, int alState)
{
if (alState == 1)
{
SetMoveObjectState("secretshelf",1.0f);
CompleteQuest("StudyBookMemento", "StudyBookMemento");
PlaySoundAtEntity("", "door_mansion_open.ogg", "secretlever1", 0, false);
return;
}
}

//Secret Shelf - End
////////////////////////////////////

void OnStart()
{
AddUseItemCallback("", "studydoorkey", "Studydoor", "StudyDoorKeyOpen", true);
AddUseItemCallback("", "key_work", "door_work", "KeyWorkOpen", true);
AddUseItemCallback("", "studystoragekey", "StudyStorageDoor", "StudyStorageKeyOpen", true);
AddUseItemCallback("", "hammer1", "wooden_boards_1", "WoodenBoardHammerOpen", true);
AddUseItemCallback("", "hammer1", "StudyStorageDoor", "StudyStorageHammerOpen", true);
AddEntityCollideCallback("Player", "AreaGruntRoom", "GruntRoom", true, 1);
AddEntityCollideCallback("Player", "AreaBookMemento", "BookMemento", true, 1);
AddEntityCollideCallback("Player", "AreaDoorClose", "DoorCloseEvent", true, 1);
AddEntityCollideCallback("Player", "AreaQuestComplete1", "Quest1", true, 1);
AddEntityCollideCallback("hammergrunt", "HammerGruntCollide", "HammerCollide", true, 1);
AddEntityCollideCallback("roomgrunt", "RoomGruntCollide", "RoomCollide", true, 1);
SetEntityConnectionStateChangeCallback("secretlever1", "SecretShelfFunction");
}

void OnEnter()
{
}

void OnLeave()
{
}


extra_english.lang file


Quote:<LANGUAGE>

//////////////////////////////
//Description - Start

<CATEGORY Name="CustomStoryMain">
<Entry Name="Description">[br]Dear Rokotain.[br][br]
You have been knocked unconscious for two days now as I'm writing this.[br]
You have been poisoned with a special toxin. I have analyzed it as much as I can for now, and you seem to be weakened... very weakned.[br]
You also will suffer some kind of amnesia. If you will remember me, I don't know...[br]
When you wake up, I will most likely be gone.[br]
I will leave you another note on your desk before I leave.[br]
Wake up please..[br]
</Entry>

//Description - End
//////////////////////////////


//////////////////////////////
//Note - Start

<CATEGORY Name="Journal">
<Entry Name="Note_StartNote_Name">Dear Rokotain.</Entry>
<Entry Name="Note_StartNote_Text">I will have to go, very soon. It is not safe for me here.
They are after me and I hope by doing what I did, he will leave you in peace.
I will tell you what happened as I doubt you remember anything.
</Entry>
</CATEGORY>

//Note - End
//////////////////////////////


//////////////////////////////
//Memento - Start

<CATEGORY Name="Journal">
<Entry Name="Quest_MinaDoor_Text">The door is locked with a small simple lock. It could easily be picked open.</Entry>
</CATEGORY>

<CATEGORY Name="Journal">
<Entry Name="Quest_DoorCloseMemento_Text">Someone locked the door! I need to find another way out of the room now.</Entry>
</CATEGORY>

<CATEGORY Name="Journal">
<Entry Name="Quest_StudyStorageMemento_Text">I've unlocked the door with the key, but it still won't budge. Although this is the oldest door in the Studium. It could be destroyed easily.</Entry>
</CATEGORY>

<CATEGORY Name="Journal">
<Entry Name="Quest_StudyLevelDoor_Text">The Studium Door is locked. Perhaps I should look around in some other rooms?</Entry>
</CATEGORY>

<CATEGORY Name="Journal">
<Entry Name="Quest_HallLevelDoor_Text">The Main Hall door is firmly locked. The key would most likely be in the Studium, if I remember correctly...</Entry>
</CATEGORY>

<CATEGORY Name="Journal">
<Entry Name="Quest_StudyBookMemento_Text">There is a strange bookshelf in the first room of the study. I should check if I can find a trigger mechanism, such as a lever somewhere.</Entry>
</CATEGORY>

//Memento - End
//////////////////////////////


//////////////////////////////
//Inventory - Start

<CATEGORY Name="Inventory">
<Entry Name="ItemDesc_MainHallKey">This is the key that will fit to the door leading to the Main Hall.</Entry>
<Entry Name="ItemName_MainHallKey">Main Hall Key</Entry>
</CATEGORY>

<CATEGORY Name="Inventory">
<Entry Name="ItemDesc_StudyMainKey">A solid steel key to unlock the Studium.</Entry>
<Entry Name="ItemName_StudyMainKey">Studium Key</Entry>
</CATEGORY>

<CATEGORY Name="Inventory">
<Entry Name="ItemDesc_StudyDoorKey">A key engraved with a capital "R". The key to my own personal study.</Entry>
<Entry Name="ItemName_StudyDoorKey">Study Key</Entry>
</CATEGORY>

<CATEGORY Name="Inventory">
<Entry Name="ItemDesc_StudyStorageKey">A small copper key. Most likely for one of the doors in the Studium.</Entry>
<Entry Name="ItemName_StudyStorageKey">Studium Key</Entry>
</CATEGORY>

<CATEGORY Name="Inventory">
<Entry Name="ItemDesc_KeyWorkRoom">An Iron key. Most likely for one of the doors in the Studium Storage area.</Entry>
<Entry Name="ItemName_KeyWorkRoom">Main Hall Key</Entry>
</CATEGORY>

//Inventory - End
//////////////////////////////


//////////////////////////////
//Flashbacks - Start

<CATEGORY Name="Flashbacks">
<Entry Name="StudySafe01">The Studium is one of my latest creations.</Entry>
<Entry Name="StudySafe02">It's a quiet and nice place to study or just relax.</Entry>
<Entry Name="StudySafe03">It also contains a great collection of books.</Entry>
<Entry Name="StudySafe04">Ohh I see. So this is the sort of place</Entry>
<Entry Name="StudySafe05">I could continue my research on?</Entry>
<Entry Name="StudySafe06">Yes, a very suitable one I would say.</Entry>
<Entry Name="StudySafe07">But it's getting late. We should get some rest.</Entry>
</CATEGORY>

<CATEGORY Name="Flashbacks">
<Entry Name="StudyDanger01">Quickly! They're comming!</Entry>
<Entry Name="StudyDanger02">I need to hide the key, but where?!</Entry>
<Entry Name="StudyDanger03">Under the carpet would do!</Entry>
<Entry Name="StudyDanger04">*Door Breaks*</Entry>
<Entry Name="StudyDanger05">*Girl Screams*</Entry>
</CATEGORY>

<CATEGORY Name="Flashbacks">
<Entry Name="BedroomTown01">Good Morning.</Entry>
<Entry Name="BedroomTown02">Had a good night's sleep, did you?</Entry>
<Entry Name="BedroomTown03">*Yawn*</Entry>
<Entry Name="BedroomTown04">Yes. Thank you.</Entry>
<Entry Name="BedroomTown05">Today we need to get some supplies from the local village.</Entry>
<Entry Name="BedroomTown06">Anything I should bring?</Entry>
<Entry Name="BedroomTown07">No. It will be fine. I got everything already.</Entry>
<Entry Name="BedroomTown08">Ok. I'll just put my lantern back into the workdesk.</Entry>
</CATEGORY>

<CATEGORY Name="Flashbacks">
<Entry Name="BedroomVisitors01">..and this will be your dormitories.</Entry>
<Entry Name="BedroomVisitors02">There are plenty of storage for supplies in the drawers and cupboards.</Entry>
<Entry Name="BedroomVisitors03">Tomorrow you can start working on the studium corridors.</Entry>
<Entry Name="BedroomVisitors04">But isn't the studium locked?</Entry>
<Entry Name="BedroomVisitors05">Do not worry. I will leave the key in one of your rooms.</Entry>
<Entry Name="BedroomVisitors06">Good night.</Entry>
</CATEGORY>

//Flashbacks - End
//////////////////////////////

</LANGUAGE>

(This post was last modified: 12-31-2011, 12:24 PM by Rokotain.)
12-31-2011, 11:00 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#4
RE: Error Message, doesn't specify what problem is

Can you post your script in a quote? PhP really seems to not work properly.

12-31-2011, 12:01 PM
Find
Rokotain Offline
Member

Posts: 54
Threads: 9
Joined: Jul 2011
Reputation: 0
#5
RE: Error Message, doesn't specify what problem is

There, thanks for the tip.
Imo quote is much easier to read. Also looks better^_^

[EDIT]
I figured the problem to the error message. The numbers, 82 and 95, are the numbers of the two lines that had the error in them. I used notepad ++ to open and see this.

But everything looked fine at first, but I found out I had forgotten then ; which is always after a commando.
Like this:
SetEntityActive("example", true);

Thanks anyhow, and I still got 3 problems left : p

(This post was last modified: 12-31-2011, 02:51 PM by Rokotain.)
12-31-2011, 12:25 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#6
RE: Error Message, doesn't specify what problem is

First off, to fix your .lang.

If there is ONE LITTLE ERROR in the .lang, the whole .lang will fail. The game wont tell you what's wrong, it will simply ignore it. Figure out what was the last thing you typed before the .lang failed and make sure there are no errors.

As for the lantern thing, You can simply put:


void IfHasLantern(string &in asParent, string &in asChild, int alState)
{
if(HasItem("lantern") == true)
{
SetEntityActive("AreaLookGrunt", true);
}
if(HasItem("lantern") == false)
{

}
}


Also, you don't have to separate Categories like you did if they're all the same. This is just going to make it unorganized and hard to find errors. >> You only need one category for each group of entries following that category.
I went ahead and cleaned everything up for you. Also, I believe your issue was a missing "</CATEGORY>" for the custom story description. I added it, so let me know how it works. Just copy and replace everything in the original .lang. (maybe make a back-up if you're uncomfortable)

I left the .lang in a zip in the attachment below. It will have tabs and be more organized than pasting it here.
(This post was last modified: 12-31-2011, 04:38 PM by Statyk.)
12-31-2011, 04:23 PM
Find
Rokotain Offline
Member

Posts: 54
Threads: 9
Joined: Jul 2011
Reputation: 0
#7
RE: Error Message, doesn't specify what problem is

Thank you.
I wasn't aware that you wouldn't need to separate them all the time.
I compared the .lang files and I really could see the difference : p*

I kept the one you made, as I see what you did compared to mine.
It's much more tidier.

And I also noticed the missing "/category" text you mentioned.

I still have problem 3 left though :3

The journal entries and item description now works just fine.
Again thanks. Angel
(This post was last modified: 12-31-2011, 06:40 PM by Rokotain.)
12-31-2011, 06:38 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#8
RE: Error Message, doesn't specify what problem is

Problem 3:

Make a script area around the door, go into the "area" tab on the right and fill in the PlayerLookAtCallback box with "kitchenlookat" and make sure "PlayerLookAtCallbackAutoRemove" is checked, then go into your .hps and anywhere in it, put this, changing caps with your info:

//__________________________

void kitchenlookat(string &in asEntity, int alState)
{
SetMessage("MESSAGE_CATEGORY", "MESSAGE_ENTRY", 4);
}
12-31-2011, 07:09 PM
Find
Rokotain Offline
Member

Posts: 54
Threads: 9
Joined: Jul 2011
Reputation: 0
#9
RE: Error Message, doesn't specify what problem is

(12-31-2011, 07:09 PM)Statyk Wrote: Problem 3:

Make a script area around the door, go into the "area" tab on the right and fill in the PlayerLookAtCallback box with "kitchenlookat" and make sure "PlayerLookAtCallbackAutoRemove" is checked, then go into your .hps and anywhere in it, put this, changing caps with your info:

//__________________________

void kitchenlookat(string &in asEntity, int alState)
{
SetMessage("MESSAGE_CATEGORY", "MESSAGE_ENTRY", 4);
}
Sorry if this is a really nooby question : p
But what should I put in the message category? I tried something similar once, but just got error.
Would you please post an example^^?
12-31-2011, 08:13 PM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#10
RE: Error Message, doesn't specify what problem is

(12-31-2011, 08:13 PM)Rokotain Wrote:
(12-31-2011, 07:09 PM)Statyk Wrote: Problem 3:

Make a script area around the door, go into the "area" tab on the right and fill in the PlayerLookAtCallback box with "kitchenlookat" and make sure "PlayerLookAtCallbackAutoRemove" is checked, then go into your .hps and anywhere in it, put this, changing caps with your info:

//__________________________

void kitchenlookat(string &in asEntity, int alState)
{
SetMessage("MESSAGE_CATEGORY", "MESSAGE_ENTRY", 4);
}
Sorry if this is a really nooby question : p
But what should I put in the message category? I tried something similar once, but just got error.
Would you please post an example^^?
Add this to the lang somewhere:

<CATEGORY Name="MiscMessages">
<Entry Name="kitchentext1">The Kitchen</Entry>
</CATEGORY>

//________________________

Then replace "MESSAGE_CATEGORY" with: "MiscMessages"
and "MESSAGE_ENTRY" with: "kitchentext1"
12-31-2011, 08:23 PM
Find




Users browsing this thread: 1 Guest(s)