Hey again!
Just as I was programming a script event, I started to get the error "Unexpected end of file ')'", which normally isn't a hard problem, usually a typo. The only catch this time was that it said the typo was in the "OnLeave" function which is empty!
////////////////////////////
// Run first time starting map
void OnStart()
{
if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");
for(int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");
}
SetEntityConnectionStateChangeCallback("elevator_lever_1", "func_drop");
SetEntityActive("servant_brute_1", false);
SetLocalVarInt("Door_Final", 0);
AddEntityCollideCallback("safety_normal_vert_1", "Door_Collide, "Stop_Moving", true, 1);
}
void Used_Lever_On_Door(string &in asTimer)
{
if(GetLocalVarInt("Door_Final") == 1)
{
//Do Nothing
}
else
{
AddPropForce("safety_normal_vert_1", 0.0, 1000, 0, "world");
}
}
void Stop_Moving(string &in asParent, string &in asChild, int alState)
{
//========Stop Moving the Door============
SetLocalVarInt("Door_Final", 1);
}
void func_drop(string &in asEntity, int alState)
{
if (alState == 1)
{
AddTimer("", 0.01, "Used_Lever_On_Door");
PlaySoundAtEntity("", "quest_completed.snt", "elevator_lever_1", 0, false);
return;
}
}
//===========================================
// This runs when the player enters the map
void OnEnter()
{
}
//===========================================
// This runs when the player leaves the map
void OnLeave()
{
}
Could any of my other code have affected this? That would certainly be a very weird error
//Kind Regards,
Twitchez