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 Unexpected End of File
Aglowglint11 Offline
Junior Member

Posts: 31
Threads: 8
Joined: Mar 2014
Reputation: 0
#1
Error Unexpected End of File

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

N00B
03-07-2014, 11:43 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#2
RE: Error Unexpected End of File

Try that :3

PHP Code: (Select All)
// 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);


Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 03-08-2014, 01:34 AM by Romulator.)
03-08-2014, 01:33 AM
Find
Urkle Offline
FG - Associate

Posts: 1,172
Threads: 31
Joined: Jul 2006
Reputation: 21
#3
RE: Error Unexpected End of File

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

Developing away on one of
Multiple Macs running 10.6, 10.7, 10.8, and 10.9.
Linux, 8-core AMD, 8GB RAM, Fedora 18, nVidia 450 1GB
(This post was last modified: 03-08-2014, 03:40 AM by Urkle.)
03-08-2014, 03:39 AM
Website Find
Aglowglint11 Offline
Junior Member

Posts: 31
Threads: 8
Joined: Mar 2014
Reputation: 0
#4
RE: Error Unexpected End of File

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)

N00B
(This post was last modified: 03-08-2014, 12:07 PM by Aglowglint11.)
03-08-2014, 12:05 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#5
RE: Error Unexpected End of File

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

PHP Code: (Select All)
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);


Discord: Romulator#0001
[Image: 3f6f01a904.png]
03-08-2014, 12:13 PM
Find
Aglowglint11 Offline
Junior Member

Posts: 31
Threads: 8
Joined: Mar 2014
Reputation: 0
#6
RE: Error Unexpected End of File

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.
03-08-2014, 02:47 PM
Find
Urkle Offline
FG - Associate

Posts: 1,172
Threads: 31
Joined: Jul 2006
Reputation: 21
#7
RE: Error Unexpected End of File

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

Developing away on one of
Multiple Macs running 10.6, 10.7, 10.8, and 10.9.
Linux, 8-core AMD, 8GB RAM, Fedora 18, nVidia 450 1GB
03-08-2014, 02:55 PM
Website Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#8
RE: Error Unexpected End of File

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

"Veni, vidi, vici."
"I came, I saw, I conquered."
03-08-2014, 02:59 PM
Find
Aglowglint11 Offline
Junior Member

Posts: 31
Threads: 8
Joined: Mar 2014
Reputation: 0
#9
RE: Error Unexpected End of File

(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
03-08-2014, 03:37 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#10
RE: Error Unexpected End of File

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

"Veni, vidi, vici."
"I came, I saw, I conquered."
03-08-2014, 03:41 PM
Find




Users browsing this thread: 1 Guest(s)