Frictional Games Forum (read-only)
Unexpected Token - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Technical Support (https://www.frictionalgames.com/forum/forum-57.html)
+--- Forum: Technical Support - Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-31.html)
+--- Thread: Unexpected Token (/thread-13332.html)



Unexpected Token - Southlaguna - 02-14-2012

Recently i have had an unsolved error that some may have already viewed, now my my PC has its own version of this error by saying ERR: Unexpected Token { 30,1
{ 42, 1
{ 50, 1
Here is my .hps


//----Piano---//
void Piano1(string &in asTimer)
{
PlaySoundAtEntity("piano1", "general_piano03.snt", "piano_1", 0, false);
AddTimer("Piano1", 0, "Piano1");
}

void pianostop_1(string &in asParent, string &in asChild, int alState)
{
StopSound("piano1", 0);
RemoveTimer("Piano1");
AddPropImpulse("piano_1", 0, 0, 100, "World");
SetLeverStuckState("piano_1", 0, true);
FadeLightTo("PianoLight_1", 1, 0, 0, 1, 8, 0);
}
//----PILLARHALL----//
void NightmareStart(string &in asParent, string &in asChild, int alState)
{
AddTimer("T1", 1, "ScreamSequence");
AddTimer("T2", 3, "ScreamSequence");
}

void ScreamSequence(string &in asTimer)
{
PlayMusic("guardian_activated1.ogg", false, 2, 1, 0, false);
}

//////////////////////
// void OnStart()
{
AddTimer("Piano1", 0, "Piano1");
AddEntityCollideCallback("Player", "pianostop_1", "pianostop_1", true, 1);
AddEntityCollideCallback("Player", "ActivateNightmare", "NightmareStart", true, 1);
AddEntityCollideCallback("Player", "ActivateNightmare_2", "Boo1", true, 1);
AddEntityCollideCallback("Player", "ActivateNightmare_5", "Boo2", true, 1);
AddEntityCollideCallback("Player", "ActivateNightmare_9", "Boo3", true, 1);
AddEntityCollideCallback("Player", "ActivateNightmare_10", "Boo4", true, 1);
AddEntityCollideCallback("Player", "ActivateNightmare_6", "Boo5", true, 1);
AddEntityCollideCallback("Player", "ActivateNightmare_3", "Boo6", true, 1);
AddEntityCollideCallback("Player", "Hallmonsters_1", "Boo", true, 1);
AddEntityCollideCallback("Player", "Hallmonsters_3", "Boo", true, 1);
}

//////////////////////
// void OnEnter()
{


}

//////////////////////
// void OnLeave()
{

}

The errors are after each of my void On blah blah blah. If anyone can spot a problem with this let me know if not i guess its just some other messed up issue that no one can solve, heres the hpl, please help im getting real sick of this problem




RE: Unexpected Token - Your Computer - 02-14-2012

You commented out the default map functions (i.e. OnStart, OnEnter, OnLeave).


RE: Unexpected Token - Southlaguna - 02-14-2012

I got the same result, its strange that this happens to completely different custom stories on my mac and my pc but with different errors, both involving the opening or closing brackets. It cant be both of my systems preventing the story from working. I have even tried installing a torrented version to see if its something wrong with the game i bought, i also torrented the editor and a notepad++ but still the same problem. How can this even be possible?