Aglowglint11
Junior Member
Posts: 31
Threads: 8
Joined: Mar 2014
Reputation:
0
|
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
~Skyrimdude111
N00B
|
|
03-07-2014, 11:43 PM |
|
Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
|
RE: Error Unexpected End of File
Try that :3
// 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); AddUseItemCallback("", "Stairs_Key", "Stairs_Downstairs", "UsedKeyonDoor", true);
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 }
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); }
Discord: Romulator#0001
(This post was last modified: 03-08-2014, 01:34 AM by Romulator.)
|
|
03-08-2014, 01:33 AM |
|
Urkle
FG - Associate
Posts: 1,172
Threads: 31
Joined: Jul 2006
Reputation:
21
|
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 |
|
Aglowglint11
Junior Member
Posts: 31
Threads: 8
Joined: Mar 2014
Reputation:
0
|
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 |
|
Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
|
RE: Error Unexpected End of File
No no, he means at the end of the OnStart() function, like this;
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); AddUseItemCallback("", "Stairs_Key", "Stairs_Downstairs", "UsedKeyonDoor", true); }
Discord: Romulator#0001
|
|
03-08-2014, 12:13 PM |
|
Aglowglint11
Junior Member
Posts: 31
Threads: 8
Joined: Mar 2014
Reputation:
0
|
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 |
|
Urkle
FG - Associate
Posts: 1,172
Threads: 31
Joined: Jul 2006
Reputation:
21
|
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 |
|
PutraenusAlivius
Posting Freak
Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation:
119
|
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 |
|
Aglowglint11
Junior Member
Posts: 31
Threads: 8
Joined: Mar 2014
Reputation:
0
|
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 |
|
PutraenusAlivius
Posting Freak
Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation:
119
|
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 |
|
|