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
Script Help Unexpected end of file
Lizard Offline
Member

Posts: 174
Threads: 23
Joined: Jul 2012
Reputation: 5
#1
Unexpected end of file

I've looked through my script a couple of times now, by it keeps saying Unexpected end of file when i try load my map.
I would be glad if you could help me with finding out whats wrong.

////////////////////////////
// Run first time entering map
void OnStart()
{
SetEntityPlayerInteractCallback("CellarKey", "ActivateMonster", true);
SetEntityPlayerInteractCallback("note2", "ActivateMoonster", true);
SetEntityPlayerInteractCallback("WineKey", "ActivateMooonster", true);
SetEntityPlayerInteractCallback("CellarKey2", "ActivateEntity", true);
AddEntityCollideCallback("Player", "LanternRoomArea", "CollideRoomTwo", true, 1);
AddEntityCollideCallback("Player", "KeyRoomArea", "CollideRoomTwo", true, 1);
AddUseItemCallback("", "CorridorKey", "Corridor_Door", "UsedKeyOnDoor", true);
AddUseItemCallback("", "CellarKey", "Cellar_Door", "UsedKeyOnDooor", true);
AddUseItemCallback("", "CellarKey2", "cellar_wood01_3", "UsedKeyOnDoooor", true);
AddUseItemCallback("", "HallwayKey", "Hallway_Door", "UsedKeyOnDooooor", true);
AddUseItemCallback("", "WineKey", "Wine_Door", "UsedKeyOnDoooooor", true);
SetEntityPlayerInteractCallback("HallwayKey", "FadeOut", true);
}

void ActivateMonster(string &in item)
{
SetEntityActive("bro_1", true);
AddEnemyPatrolNode("bro_1", "PathNodeArea_1", 0, "idle");
AddEnemyPatrolNode("bro_1", "PathNodeArea_2", 0, "idle");
AddEnemyPatrolNode("bro_1", "PathNodeArea_3", 0, "idle");
}

void ActivateMoonster(string &in item)
{
SetEntityActive("bro_2", true);
AddEnemyPatrolNode("bro_2", "PathNodeArea_4", 0, "idle");
AddEnemyPatrolNode("bro_2", "PathNodeArea_5", 0, "idle");
}

void ActivateMooonster(string &in item)
{
SetEntityActive("brute_1", true);
AddEnemyPatrolNode("brute_1", "PathNodeArea_6", 0, "idle");
AddEnemyPatrolNode("brute_1", "PathNodeArea_7", 0, "idle");
AddEnemyPatrolNode("brute_1", "PathNodeArea_8", 0, "idle");
AddEnemyPatrolNode("brute_1", "PathNodeArea_9", 0, "idle");
AddEnemyPatrolNode("brute_1", "PathNodeArea_10", 0, "idle");
AddEnemyPatrolNode("brute_1", "PathNodeArea_11", 0, "idle");

void ActivateEntity(string &in item)
{
SetEntityActive("corpse_bloody_1", true);
PlaySoundAtEntity("", "12_girl_scream", "corpse_bloody_1", 0, false);

}

void CollideRoomTwo(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("mansion_1", true, true);
SetSwingDoorClosed("mansion_2", true, true);
}

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

void UsedKeyOnDooor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Cellar_Door", false, true);
PlaySoundAtEntity("", "unlock_door", "Cellar_Door", 0, false);
RemoveItem("CellarKey");
}
void UsedKeyOnDoooor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("cellar_wood01_3", false, true);
PlaySoundAtEntity("", "unlock_door", "cellar_wood01_3", 0, false);
RemoveItem("CellarKey2");
}

void UsedKeyOnDooooor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Hallway_Door", false, true);
PlaySoundAtEntity("", "unlock_door", "Hallway_Door", 0, false);
RemoveItem("HallwayKey");
}

void UsedKeyOnDoooooor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Wine_Door", false, true);
PlaySoundAtEntity("", "unlock_door", "Wine_Door", 0, false);
RemoveItem("WineKey");
}

////////////////////////////
// Run when entering map
void OnEnter()
{

}

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

}
07-03-2012, 08:20 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Unexpected end of file

You forgot to properly close ActivateMooonster.

Tutorials: From Noob to Pro
07-03-2012, 08:29 PM
Website Find
Lizard Offline
Member

Posts: 174
Threads: 23
Joined: Jul 2012
Reputation: 5
#3
RE: Unexpected end of file

DOH What a facepalm

Thanks man
07-03-2012, 08:32 PM
Find




Users browsing this thread: 1 Guest(s)