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
Unexpected end of file - error :<
Allu442 Offline
Junior Member

Posts: 2
Threads: 1
Joined: Mar 2014
Reputation: 0
#1
Unexpected end of file - error :<

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");
}
03-16-2014, 05:23 PM
Find
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#2
RE: Unexpected end of file - error :<

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

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

A missing quote.

Derp.
03-16-2014, 05:34 PM
Find
Allu442 Offline
Junior Member

Posts: 2
Threads: 1
Joined: Mar 2014
Reputation: 0
#3
RE: Unexpected end of file - error :<

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

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

Can you help?
03-16-2014, 05:49 PM
Find
7heDubz Offline
Posting Freak

Posts: 1,329
Threads: 40
Joined: Feb 2013
Reputation: 41
#4
RE: Unexpected end of file - error :<

What exactly are you trying to do?

03-16-2014, 05:52 PM
Find
davide32 Offline
Junior Member

Posts: 27
Threads: 6
Joined: Nov 2013
Reputation: 0
#5
RE: Unexpected end of file - error :<

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
(This post was last modified: 03-20-2014, 02:57 PM by davide32.)
03-20-2014, 02:52 PM
Find




Users browsing this thread: 1 Guest(s)