Frictional Games Forum (read-only)

Full Version: script issues
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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()
{

}
Line 21 is ")" instead of "}"

You should use Notepad++, it's easier to use and to find errors. Smile
I am using it, I wasn't paying to the red outline on the closing bracket though thanks.
(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
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