Frictional Games Forum (read-only)

Full Version: Unexpected end of file - error :<
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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");
}
AddEntityCollideCallBack("Player","ScriptArea_3, "Scary_2",true,1);

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

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

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

Can you help?
What exactly are you trying to do?
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