With void OnEnter() you are missing an end bracket "}".
Had an additional end bracket at the end of "TimerLight".
The code should look like this to end:
////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player" , "ScriptArea_1" , "LightOn" , true , 1);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
void LightOn(string &in asParent, string &in asChild, int alState)
{
//we don't need this callback here, this is will only mess up the code
//AddEntityCollideCallback("Player" , "ScriptArea_1" , "LightOn" , true , 1);
StartPlayerLookAt("LookFrame", 20, 50, "");
SetLampLit("candlestick_1", true, true);
SetLampLit("candlestick_2", true, true);
//an alternate, time-saving way to do this is:
/*
for(int i=1;i<3;i++) //for loop will run when i is 1 and 2 only
SetLampLit("candlestick_"+i, true, true);
*/
//for 2 that isn't necessary but if you were lighting say 30 candles, this is almost a must!
AddTimer("light1", 0.5f, "TimerLight");
AddTimer("light2", 1, "TimerLight");
AddTimer("stopeffects", 1.2f, "TimerLight");
}
void TimerLight(string &in asTimer)
{
if(asTimer == "light1")
{
SetLampLit("candlestick_3", true, true);
SetLampLit("candlestick_4", true, true);
}
if(asTimer == "light2")
{
SetLampLit("candlestick_5", true, true);
SetLampLit("candlestick_6", true, true);
}
if(asTimer == "stopeffects")
{
StopPlayerLookAt();
}
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
That should be correct, but if you get another error just let me know.