Frictional Games Forum (read-only)
Big trouble! (SOLVED) - 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: Big trouble! (SOLVED) (/thread-5753.html)



Big trouble! (SOLVED) - HumiliatioN - 12-15-2010

Okay now i am serious trouble

I was writing second map Script hps.file

The first script was normally "How to unlock door with key"

Then i tested it many times.. not working.. then i want to go back my first map then this errors came

- FATAL ERROR: Could not load script file 'custom_stories/FTD/custom_stories/FTD/maps/00_example.hps'! main 75,1 : ERR : Unexpected end of file

What is this? Im shocked dont tell me my both maps is ruined because then i try to remove second map hps. file not working... Help Sad


RE: Big trouble! - Frontcannon - 12-15-2010

What is it that everything you touch stops working??

Also, check (remember this word, I'm going to use it in every post I make to you from now on) the error message.
What is in line 75, 1?


RE: Big trouble! - HumiliatioN - 12-15-2010

(12-15-2010, 11:28 PM)Frontcannon Wrote: What is it that everything you touch stops working??

Also, check (remember this word, I'm going to use it in every post I make to you from now on) the error message.
What is in line 75, 1?

Okay i knew that now.. And sorry.. i just wanna make this one map completed

Okay heres the full script on my first level:

void OnStart()

////// Starting Monster-fuctions
{
AddEntityCollideCallback("Player" , "Origin" , "scareactivate" , true , 1);
AddEntityCollideCallback("Player" , "Origin2" , "scareactivate2" , true , 1);
AddEntityCollideCallback("Player", "Sound_Area1", "PlaySound1", false, 0);
}

////////////////////////////
// Run when entering map

//////Door key open Functions

void OnEnter()
{
AddUseItemCallback("", "Door key I", "door_1", "KeyOnDoor", true);
AddUseItemCallback("", "Door key II", "door_2", "KeyOnDoor2", true);
AddUseItemCallback("", "Door key III", "door_3", "KeyOnDoor3", true);
AddUseItemCallback("", "Hall key", "door_4", "KeyOnDoor4", true);
}

////////////////////////////
// Run when leaving map

void OnLeave()
{
}

////////////////////////////
// Actual functions

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "door_1", 0.0f, false);
RemoveItem("Door_key I");


void KeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_2", false, true);
RemoveItem("Door_key II");
PlaySoundAtEntity("", "unlock_door.snt", "door_1", 0.0f, true);
}

void KeyOnDoor3(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_3", false, true);
RemoveItem("Door key III");
PlaySoundAtEntity("", "unlock_door.snt", "door_1", 0.0f, true);
}

void KeyOnDoor4(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_4", false, true);
RemoveItem("Hall key");
PlaySoundAtEntity("", "unlock_door.snt", "door_1", 0.0f, true);
}

void scareactivate(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("monster_1" , true);
AddEnemyPatrolNode("monster_1", "PathNodeArea_1", 0.0f, "true");
}

void scareactivate2(string &in asParent , string &in asChild , int alState)
{
SetEntityActive("monster_2" , true);
AddEnemyPatrolNode("monster_2", "PathNodeArea_2", 0.1f, "true");
AddEnemyPatrolNode("monster_2", "PathNodeArea_3", 0.1f, "true");
AddEnemyPatrolNode("monster_2", "PathNodeArea_4", 0.1f, "true");
AddEnemyPatrolNode("monster_2", "PathNodeArea_5", 0.1f, "true");
}
<--- This is line 75,1 i dont get it :I


RE: Big trouble! - Frontcannon - 12-15-2010

There's no error in 75, 1. But look at the message: 'Unexpected end of file'. The game thinks there has to be something there, but why?
What is it waiting for? Let's look at the brackets. If you've missed one, get Notepad++.

.
.
.

Yup. Found it. Check KeyOnDoor.


RE: Big trouble! - HumiliatioN - 12-15-2010

(12-15-2010, 11:42 PM)Frontcannon Wrote: There's no error in 75, 1. But look at the message: 'Unexpected end of file'. The game thinks there has to be something there, but why?
What is it waiting for? Let's look at the brackets. If you've missed one, get Notepad++.

.
.
.

Yup. Found it. Check KeyOnDoor.

Which part you mean?

This? AddUseItemCallback("", "Door key I", "door_1", "KeyOnDoor1", true);

or

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "door_1", 0.0f, true);
RemoveItem("Door_key I");

I dont see any errors. Huh
(12-15-2010, 11:52 PM)HumiliatioN Wrote:
(12-15-2010, 11:42 PM)Frontcannon Wrote: There's no error in 75, 1. But look at the message: 'Unexpected end of file'. The game thinks there has to be something there, but why?
What is it waiting for? Let's look at the brackets. If you've missed one, get Notepad++.

.
.
.

Yup. Found it. Check KeyOnDoor.

Which part you mean?

This? AddUseItemCallback("", "Door key I", "door_1", "KeyOnDoor1", true);

or

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "door_1", 0.0f, true);
RemoveItem("Door_key I");

I dont see any errors. Huh

Oh, that } Sorry... i dont bother you anymore i hope if it is really important Smile