Frictional Games Forum (read-only)
Unexpected end of file - error :< - 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: Unexpected end of file - error :< (/thread-24853.html)



Unexpected end of file - error :< - Allu442 - 03-16-2014

When i start my story, it says error : Unexpected end of file

I tried to make 3 scriptareas and grunts in same level :

Script:
--------------------------------------------------------------------
void OnStart()
{
AddUseItemCallback("", "key_study_1", "castle_1", "UseKeyOnDoor", true);
AddEntityCollideCallback("Player", "ScriptArea_1", "Scary_1", true, 1);
AddEntityCollideCallback("Player","ScriptArea_2","Scary_2",true,1);
AddEntityCollideCallBack("Player","ScriptArea_3, "Scary_2",true,1);
}

void UseKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
}

void ScriptArea_1(string &in asItem, string &in asEntity)
{
PlaySoundAtEntity("", "enabled.snt", "Player", 0, false);
GiveSanityBoostSmall();
}
void Scary_1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt1", true);
AddPropImpulse("grunt1", 10000, 0, 0, "world");
}

void Scary_2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt2", true);
AddPropImpulse("grunt2", 10000, 0, 0, "world");
}

void ScriptArea_3(string &in asItem, string &in asEntity)
{
PlaySoundAtEntity("", "enabled.snt", "Player", 0, false);
GiveSanityBoostSmall();
}
void Scary_3(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("grunt3", true);
AddPropImpulse("grunt3", 10000, 0, 0, "world");
}


RE: Unexpected end of file - error :< - Neelke - 03-16-2014

AddEntityCollideCallBack("Player","ScriptArea_3, "Scary_2",true,1);

AddEntityCollideCallBack("Player","ScriptArea_3", "Scary_2",true,1);

A missing quote.


RE: Unexpected end of file - error :< - Allu442 - 03-16-2014

Thx, i removed that and now it's work.

But how i can add 3 or more gruntscripts on same level.

Can you help?


RE: Unexpected end of file - error :< - 7heDubz - 03-16-2014

What exactly are you trying to do?


RE: Unexpected end of file - error :< - davide32 - 03-20-2014

A quote is important with amnesia if you forget a " or; Amnesia can't read the file. i think it does it work

morge it in your file.hps


it should be: AddEntityCollideCallback("Player","ScriptArea_3", "Scary_2", true, 1);

not : AddEntityCollideCallBack("Player","ScriptArea_3, "Scary_2", true, 1);
and you putted:
void ScriptArea_1(string &in asItem, string &in asEntity)
{
PlaySoundAtEntity("", "enabled.snt", "Player", 0, false);
GiveSanityBoostSmall();
}
why you putted it and string is (string &in asItem, string &in asEntity)? I can't find the AddUseItemCallback with a function called: ScriptArea_1