Frictional Games Forum (read-only)
Error Unexpected End of File - 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 Unexpected End of File (/thread-24774.html)

Pages: 1 2


Error Unexpected End of File - Aglowglint11 - 03-07-2014

Hey Guys, I'm getting this error for my first map and can you possibly help me? Thanks. Here is my script. It says this: "FATAL ERROR: Could not load script file 'custom_stories/Into The Depths/maps/01.hps'! Main (41,2): ERR: Unexpected end of file"
=======================================================
Script Under here
=======================================================


////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "SoundArea_1", "Sound_1", True, 1);
AddEntityCollideCallback("Player", "fallarea", "fall", True, 1);
AddEntityCollideCallback("Player", "SoundArea_2", "Sound_2", True, 1);
AddEntityCollideCallback("Player", "SoundArea_3", "Sound_3", True, 1);

void fall(string &in asParent, string &in asChild, int alState); {
SetEntityActive("2", True);
SetEntityActive("3", True);
SetEntityActive("4", True);
SetEntityActive("5", True);
SetEntityActive("6", True);
}

void Sound_1(string &in asParent, string &in asChild, int alState) {
PlaySoundAtEntity("", "react_breath1.ogg", "Player", 0, False);
react_breath1.ogg
}

{
AddUseItemCallback("", "Stairs_Key", "Stairs_Downstairs", "UsedKeyonDoor", true);
}

void UsedKeyonDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Stairs_Downstairs", false, true);
PlaySoundAtEntity("", "unlock_door", "Stairs_Downstairs", 0, false);
RemoveItem("Stairs_Key");
}

void Sound_2(string &in asParent, string &in asChild, int alState) {
PlaySoundAtEntity("", "general_thunder1.ogg", "Player", 0, False);

}

void Sound_3(string &in asParent, string &in asChild, int alState) {
PlaySoundAtEntity("", "amb_idle_whimp01.ogg", "Player", 0, False);
}



======================================================
Script ends here
======================================================
Please, help if you can. Thanks Big Grin

~Skyrimdude111


RE: Error Unexpected End of File - Romulator - 03-08-2014

Try that :3

PHP Code:
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player""SoundArea_1""Sound_1"True1);
AddEntityCollideCallback("Player""fallarea""fall"True1);
AddEntityCollideCallback("Player""SoundArea_2""Sound_2"True1);
AddEntityCollideCallback("Player""SoundArea_3""Sound_3"True1);
AddUseItemCallback("""Stairs_Key""Stairs_Downstairs""UsedKeyonDoor"true);

void fall(string &in asParentstring &in asChildint alState)
{
    
SetEntityActive("2"True);
    
SetEntityActive("3"True);
    
SetEntityActive("4"True);
    
SetEntityActive("5"True);
    
SetEntityActive("6"True);
}

void Sound_1(string &in asParentstring &in asChildint alState
{
    
PlaySoundAtEntity("""react_breath1.ogg""Player"0False);
    
react_breath1.ogg
}

void UsedKeyonDoor(string &in asItemstring &in asEntity)
{
    
SetSwingDoorLocked("Stairs_Downstairs"falsetrue);
    
PlaySoundAtEntity("""unlock_door""Stairs_Downstairs"0false);
    
RemoveItem("Stairs_Key");
}

void Sound_2(string &in asParentstring &in asChildint alState
{
    
PlaySoundAtEntity("""general_thunder1.ogg""Player"0False);    
}

void Sound_3(string &in asParentstring &in asChildint alState
{
    
PlaySoundAtEntity("""amb_idle_whimp01.ogg""Player"0False);




RE: Error Unexpected End of File - Urkle - 03-08-2014

still missing a closing brace } on the OnStart() function.

Move this into the appropriate forum as well, as this is related to Amnesia: TDD not HPL1


RE: Error Unexpected End of File - Aglowglint11 - 03-08-2014

This script is still telling me of errors but it's in a different line, I think it was (40,3) or something or (41,3) But thanks again, hope we can solve this problem.

~Skyrimdude111

(03-08-2014, 03:39 AM)Urkle Wrote: still missing a closing brace } on the OnStart() function.

Move this into the appropriate forum as well, as this is related to Amnesia: TDD not HPL1

Hey, I put the brace } In after the OnStart() Like this



// Run first time starting map
void OnStart() }
{

And now it's telling me :ERR: Expected ',' or ';'

~Skyrimdude111

(Sorry about the wrong forum thingy, I wasn't sure if I should do HPL or Amnesia)


RE: Error Unexpected End of File - Romulator - 03-08-2014

No no, he means at the end of the OnStart() function, like this;

PHP Code:
void OnStart()
{
AddEntityCollideCallback("Player""SoundArea_1""Sound_1"True1);
AddEntityCollideCallback("Player""fallarea""fall"True1);
AddEntityCollideCallback("Player""SoundArea_2""Sound_2"True1);
AddEntityCollideCallback("Player""SoundArea_3""Sound_3"True1);
AddUseItemCallback("""Stairs_Key""Stairs_Downstairs""UsedKeyonDoor"true);




RE: Error Unexpected End of File - Aglowglint11 - 03-08-2014

It says now:

FATAL ERROR: Could not load script file 'Custom_stories/Into The Depths/maps/01.hps'!
Main (4,62) :ERR: True is not declared
Main (5,1) :ERR: No Matching Signatures to 'AddEntityCollideCallback(String@&,String@&,String@&, int, const uint)'
Main (6,1) :ERR: No Matching Signatures to 'AddEntityCollideCallback(String@&,String@&,String@&, int, const uint)
Main (7,1) :ERR: No Matching Signatures to 'AddEntityCollideCallback(String@&,String@&,String@&, int, const uint)
Main (12,26) :ERR: True is not declared
Main (13,5) :ERR: No matching signatures to 'SetEntityActive (String@&,int)'

And this goes on a little ways further, if you want me to post the whole thing I can.


RE: Error Unexpected End of File - Urkle - 03-08-2014

it's true not True.. case matters!..


RE: Error Unexpected End of File - PutraenusAlivius - 03-08-2014

First time I saw one of the guys from FG help a guy with his scripts.


RE: Error Unexpected End of File - Aglowglint11 - 03-08-2014

(03-08-2014, 02:55 PM)Urkle Wrote: it's true not True.. case matters!..

So I have one more error it's showing me!

Main (23,1) :ERR: Expected ';'

~Skyrimdude111


RE: Error Unexpected End of File - PutraenusAlivius - 03-08-2014

void Sound_1(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "react_breath1.ogg", "Player", 0, false);
}