Frictional Games Forum (read-only)
script issues - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: script issues (/thread-8003.html)



script issues - evertuy - 05-15-2011

What's wrong?

Unexpected end of file at "70,1"

Ye


Quote:////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "bricksfall", "bricksactive", true, 0);
AddEntityCollideCallback("Player", "wind_open", "blowdoor", true, 0);
AddEntityCollideCallback("Player", "lantern_scare", "lanternon", true, 0);
}

void bricksactive(string &in asParent, string &in asChild, int alState)
{
PlayGuiSound("notice.snt", 4);
AddTimer("", 1.5f, "bricksactive_2");
}

void bricksactive_2(string &in asTimer)
{
SetEntityActive("brick02_3", true);
SetEntityActive("brick02_4", true);
SetEntityActive("brick02_5", true);
)

void blowdoor(string &in asParent, string &in asChild, int alState)
{
AddPropImpulse("castle_2", 0, 0, -20.0f, "world");
SetSwingDoorClosed("castle_2", false, true);
SetSwingDoorDisableAutoClose("castle_2", true);
PlaySoundAtEntity("", "scare_wind.snt", "Player", 0, false);
PlaySoundAtEntity("", "joint_squeaky_door.snt", "Player", 0, false);
}

void lanternon(string &in asParent, string &in asChild, int alState)
{
SetLanternLitCallback("scarenoise");
}

void scarenoise(bool abLit)
{
PlayGuiSound("guardian_distant3.snt", 4);
PlayGuiSound("react_pant2", 2);
AddTimer("", 4.0f, "pant_2");
AddTimer("", 9.0f, "pant_3");
StartScreenShake(0.05, 3, 0, 1);
FadeSepiaColorTo(0, 1);
}

void pant_2(string &in asTimer)
{
PlayGuiSound("react_pant1", 2);
}

void pant_2(string &in asTimer)
{
PlayGuiSound("react_pant3", 2);
}

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

}

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

}



RE: script issues - Kyle - 05-15-2011

Line 21 is ")" instead of "}"

You should use Notepad++, it's easier to use and to find errors. Smile


RE: script issues [sloved lol] - evertuy - 05-15-2011

I am using it, I wasn't paying to the red outline on the closing bracket though thanks.


RE: script issues [sloved lol] - Kyle - 05-15-2011

(05-15-2011, 02:39 AM)evertuy Wrote: I am using it, I wasn't paying to the red outline on the closing bracket though thanks.

You're welcome. Smile


RE: script issues - ferryadams10 - 05-15-2011

void bricksactive_2(string &in asTimer)
{
SetEntityActive("brick02_3", true);
SetEntityActive("brick02_4", true);
SetEntityActive("brick02_5", true);
)<----- can't you've watched a bit better? haha Tongue