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
rybray Offline
Junior Member

Posts: 31
Threads: 9
Joined: Aug 2011
Reputation: 1
#1
Unexpected end of file

I get the error saying that there is an unexpected end to my file. Could someone point out my error, I cannot find it.


/////////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "DoorAreaOne", "CollideDoorOne", true, 1);
}

void CollideDoorOne(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("cellar_wood01_slow_1", true, true);
}
////////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallback("", "DoorKey, "castle_arched01_1", "UsedKeyOnDoor", true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_arched01_1", false, true);
PlaySoundAtEntity("", "unlock_door", "castle_arched01_1", 0, false);
RemoveItem("DoorKey");
}

////////////////////////////////
// Run when leaving map
void OnLeave()
{

}
08-11-2011, 03:48 AM
Find
graykin Offline
Senior Member

Posts: 317
Threads: 12
Joined: Oct 2008
Reputation: 4
#2
RE: Unexpected end of file

In your OnEnter() function, you forgot to close DoorKey with a quotation mark.

It should look like:

AddUseItemCallback("", "DoorKey", "castle_arched01_1", "UsedKeyOnDoor", true);

It's always the little things Smile

08-11-2011, 03:52 AM
Find
rybray Offline
Junior Member

Posts: 31
Threads: 9
Joined: Aug 2011
Reputation: 1
#3
RE: Unexpected end of file

(08-11-2011, 03:52 AM)graykin Wrote: In your OnEnter() function, you forgot to close DoorKey with a quotation mark.

It should look like:

AddUseItemCallback("", "DoorKey", "castle_arched01_1", "UsedKeyOnDoor", true);

It's always the little things Smile

And to think I stared at this tiny script for 15 minutes, up and down. Thank you.
08-11-2011, 03:53 AM
Find
graykin Offline
Senior Member

Posts: 317
Threads: 12
Joined: Oct 2008
Reputation: 4
#4
RE: Unexpected end of file

No prob. Smile I've made that mistake enough times that I know what to look for.

08-11-2011, 03:58 AM
Find




Users browsing this thread: 1 Guest(s)