The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem With A Script
stjazz Offline
Junior Member

Posts: 5
Threads: 2
Joined: Jul 2012
Reputation: 0
#1
Problem With A Script

Hi, im trying to make a custom story for amnesia with a friend, but, in a level, i got an error ( Fatal Error, Main (130,2) : ERR : Unexpected end of the file )
Here is my script:


void OnStart()
{
AddUseItemCallback("", "key", "door1", "UsedKeyOnDoor", true);
AddUseItemCallback("", "key2", "door2", "UsedKeyOnDoor1", true);
AddUseItemCallback("", "key3", "door3", "UsedKeyOnDoor2", true);
AddUseItemCallback("", "key4", "level3", "UsedKeyOnDoor3", true);
AddEntityCollideCallback("Player", "ScriptArea_3", "Scary_3", true, 1);
AddEntityCollideCallback("Player", "lel1", "lel1", true, 1);
AddEntityCollideCallback("Player", "lel2", "lel2", true, 1);
AddEntityCollideCallback("Player", "lel3", "lel3", true, 1);
AddEntityCollideCallback("Player", "lel4", "lel4", true, 1);
SetEntityPlayerInteractCallback("key2", "Pickup_4", true);
SetEntityPlayerInteractCallback("key3", "Pickup_5", true);
}

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

}

void UsedKeyOnDoor1(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door2", false, true);
PlaySoundAtEntity("", "unlock_door", "door2", 0, false);
RemoveItem("key2");
}

void UsedKeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door3", false, true);
PlaySoundAtEntity("", "unlock_door", "door3", 0, false);
RemoveItem("key3");
}

void UsedKeyOnDoor3(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("level3", false, true);
PlaySoundAtEntity("", "unlock_door", "level3", 0, false);
RemoveItem("key4");
}

void scary_3(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("gay1", true);
SetEntityActive("gay2", true);
SetEntityActive("gay3", true);
AddPropImpulse("gay1", -20, 0, -20, "world");
AddPropImpulse("gay2", -20, 0, -20, "world");
AddPropImpulse("gay3", -20, 0, -20, "world");
PlayMusic("scarejump", false, 10, 0.1, 10, false);
SetEntityActive("key3", true);
}

void Pickup_4(string &in asEntity)
{
SetEntityActive("gay2_1", true);
SetEntityActive("gay2_2", true);
SetEntityActive("gay2_3", true);
SetEntityActive("gay2_4", true);
SetEntityActive("servant_grunt_1", true);
PlayMusic("scarejump", false, 10, 0.1, 10, false);
}

void Pickup_5(string &in asEntity)
{
SetEntityActive("key4", true);
}

void lel1(string &in asParent, string &in asChild, int alState)
{
AddTimer("", 0.01f, "Timer_01");
}
void Timer_01(string &in asTimer)
{
SetEntityActive("a", true);
AddPropForce("a", -30000, 0, 0, "World");
SetEntityActive("b", true);
AddPropForce("b", -30000, 0, 0, "World");
SetEntityActive("c", true);
AddPropForce("c", -30000, 0, 0, "World");
SetEntityActive("d", true);
AddPropForce("d", -30000, 0, 0, "World");
SetEntityActive("e", true);
AddPropForce("e", -30000, 0, 0, "World");
PlayMusic("scarejump", false, 10, 0.1, 10, false);
}

void lel2(string &in asParent, string &in asChild, int alState)
{
AddTimer("", 0.01f, "Timer_02");
}
void Timer_02(string &in asTimer)
{
SetEntityActive("a1", true);
AddPropForce("a1", -30000, 0, 0, "World");
etEntityActive("b1", true);
AddPropForce("b1", -30000, 0, 0, "World");
PlayMusic("scarejump", false, 10, 0.1, 10, false);
}

void lel3(string &in asParent, string &in asChild, int alState)
{
AddTimer("", 0.01f, "Timer_03");
}
void Timer_03(string &in asTimer)
{
SetEntityActive("a2, true);
AddPropForce("a2", -30000, 0, 0, "World");
SetEntityActive("b2, true);
AddPropForce("b2, -30000, 0, 0, "World");
SetEntityActive("c2, true);
AddPropForce("c2, -30000, 0, 0, "World");
PlayMusic("scarejump", false, 10, 0.1, 10, false);
}

void lel4(string &in asParent, string &in asChild, int alState)
}
AddTimer("", 0.01f, "Timer_04");
SetEntityActive("a3,true);
ShowEnemyPlayerPosition("a3);
SetEntityActive("c3,true);
}
void Timer_04(string &in asTimer)
{
SetEntityActive("b3,true);
AddPropForce("b3", -30000, 0, 0, "World");
}

Thanks for the help and support Smile
(This post was last modified: 07-01-2012, 10:03 PM by stjazz.)
07-01-2012, 09:45 PM
Find


Messages In This Thread
Problem With A Script - by stjazz - 07-01-2012, 09:45 PM
RE: Problem With A Script - by Demondays1 - 07-01-2012, 09:51 PM
RE: Problem With A Script - by EXAWOLT - 07-01-2012, 09:59 PM
RE: Problem With A Script - by stjazz - 07-01-2012, 10:02 PM
RE: Problem With A Script - by EXAWOLT - 07-01-2012, 10:05 PM



Users browsing this thread: 1 Guest(s)