Frictional Games Forum (read-only)

Full Version: ERR Expected identifier
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Fatal Error
main (88,7):ERR :Expected identifier

What's the meaning of this Huh
My Script


////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "ScriptArea_1", "Slime", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "Roar", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "S", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "Scare", true, 1);
AddUseItemCallback("", "chemie", "S_5", "aufloeser", true);
AddEntityCollideCallback("Player", "ScriptArea_7", "Sound", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_5", "Monster", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_8", "Baum", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_6", "laugh", true, 1);
}
void Slime(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "scare_loon.snt", "Player", 0, false);
AddTimer("", 4, "Wispher");
}
void Wispher(string &in asTimer)
{
PlaySoundAtEntity("", "insanity_imageflash01.snt", "Player", 0, false);
AddTimer("", 7, "Help");
}
void Help(string &in asTimer)
{
PlaySoundAtEntity("", "guardian_distant1.snt", "Player", 0, false);
}
void S(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "guardian_activated.snt", "Player", 0, false);
SetPropActiveAndFade("S_1", true, 1.0f);
CreateParticleSystemAtEntity("", "ps_guardian_appear_explosion.ps", "particle_1", false);
SetPropActiveAndFade("S_2", true, 1.0f);
CreateParticleSystemAtEntity("", "ps_guardian_appear_explosion.ps", "particle_2", false);
SetPropActiveAndFade("S_3", true, 1.0f);
CreateParticleSystemAtEntity("", "ps_guardian_appear_explosion.ps", "particle_3", false);
SetPropActiveAndFade("S_4", true, 1.0f);
CreateParticleSystemAtEntity("", "ps_guardian_appear_explosion.ps", "particle_4", false);
SetPropActiveAndFade("S_5", true, 1.0f);
CreateParticleSystemAtEntity("", "ps_guardian_appear_explosion.ps", "particle_5", false);
StartScreenShake(0.9f, 1, 0.9f, 1.0f);
}
void Scare(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "guardian_activated.snt", "Player", 0, false);
SetPropActiveAndFade("P_1", true, 1.0f);
CreateParticleSystemAtEntity("", "ps_guardian_appear_explosion.ps", "particle_6", false);
SetPropActiveAndFade("P_2", true, 1.0f);
CreateParticleSystemAtEntity("", "ps_guardian_appear_explosion.ps", "particle_7", false);
SetPropActiveAndFade("P_3", true, 1.0f);
CreateParticleSystemAtEntity("", "ps_guardian_appear_explosion.ps", "particle_8", false);
SetPropActiveAndFade("P_4", true, 1.0f);
CreateParticleSystemAtEntity("", "ps_guardian_appear_explosion.ps", "particle_9", false);
SetPropActiveAndFade("P_5", true, 1.0f);
CreateParticleSystemAtEntity("", "ps_guardian_appear_explosion.ps", "particle_10", false);
SetPropActiveAndFade("P_6", true, 1.0f);
StartScreenShake(0.9f, 1, 0.9f, 1.0f);
}
void aufloeser(string &in asItem, string &in asEntity)
{
PlaySoundAtEntity("", "puzzle_add_chemical.snt", "Player", 0, false);
SetPropActiveAndFade("S_5", false, 0.9f);
RemoveItem("chemie");
}
void Sound(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "12_girl_cry.snt", "Player", 0, false);
AddTimer("", 6, "second");
}
void second(string &in asTimer)
{
PlaySoundAtEntity("", "11_owl.snt", "Player", 0, false);
AddTimer("", 3, "third");
}
void third(string &in asTimer)
{
PlaySoundAtEntity("", "00_faint.snt", "Player", 0, false);
}
void Monster(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "step_run_organic.snt", "Player", 0, false);
SetEntityActive("muddy_footprintss_5", true);
StartPlayerLookAt("muddy_footprintss_5", 2, 4, "StopPlayerLookAt");
SetPlayerActive(false);
AddTimer("", 1, "2");
}
void 2(string &in asTimer)
{
PlaySoundAtEntity("", "step_run_organic.snt", "Player", 0, false);
SetEntityActive("muddy_footprintss_4", true);
StartPlayerLookAt("muddy_footprintss_4", 2, 4, "StopPlayerLookAt");
AddTimer("", 1, "3");
}
void 3(string &in asTimer)
{
PlaySoundAtEntity("", "step_run_organic.snt", "Player", 0, false);
SetEntityActive("muddy_footprintss_3", true);
StartPlayerLookAt("muddy_footprintss_3", 2, 4, "StopPlayerLookAt");
AddTimer("", 1, "4");
}
void 4(string &in asTimer)
{
PlaySoundAtEntity("", "step_run_organic.snt", "Player", 0, false);
SetEntityActive("muddy_footprintss_2", true);
StartPlayerLookAt("muddy_footprintss_2", 2, 4, "StopPlayerLookAt");
AddTimer("", 1, "5");
}
void 5(string &in asTimer)
{
PlaySoundAtEntity("", "step_run_organic.snt", "Player", 0, false);
SetEntityActive("muddy_footprintss_1", true);
StartPlayerLookAt("muddy_footprintss_1", 2, 4, "StopPlayerLookAt");
AddTimer("", 1, "6");
}
void 6(string &in asTimer)
{
PlaySoundAtEntity("", "step_run_organic.snt", "Player", 0, false);
SetEntityActive("muddy_footprintss_6", true);
StartPlayerLookAt("muddy_footprintss_6", 2, 4, "StopPlayerLookAt");
AddTimer("", 1, "7");
}
void 7(string &in asTimer)
{
PlaySoundAtEntity("", "step_run_organic.snt", "Player", 0, false);
SetEntityActive("muddy_footprintss_7", true);
StartPlayerLookAt("muddy_footprintss_7", 2, 4, "StopPlayerLookAt");
AddTimer("", 1, "8");
}
void 8(string &in asTimer)
{
PlaySoundAtEntity("", "step_run_organic.snt", "Player", 0, false);
SetEntityActive("muddy_footprintss_8", true);
StartPlayerLookAt("muddy_footprintss_8", 2, 4, "StopPlayerLookAt");
AddTimer("", 1, "9");
}
void 9(string &in asTimer)
{
PlaySoundAtEntity("", "step_run_organic.snt", "Player", 0, false);
SetEntityActive("muddy_footprintss_9", true);
StartPlayerLookAt("muddy_footprintss_9", 2, 4, "StopPlayerLookAt");
SetPlayerActive(false);
}
void Baum(string &in asParent, string &in asChild, int alState)
{
AddPropImpulse("falling_tree_1", -2, 0, 0, "world");
PlaySoundAtEntity("", "Falling.snt", "Player", 0, false);
}
void laugh(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "00_laugh.snt", "Player", 0, false);
}
////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
void Wispher(string &in asTimer)
{
PlaySoundAtEntity("", "insanity_imageflash01.snt", "Player", 0, false);
AddTimer("", 7, "Help");
}

I didnt find its collidecallback so try removing that(but remember to copy that code just in case)
Actually i didnt find many voids callback
You have numbers as function names. You'll want to change those to actual names. It's the only issue I can immediately locate.
This isn't really possible because the void Wispher works.
I've just added the void Monster and this void is broken because after adding this the Error appears
(02-26-2012, 05:46 PM)Shives Wrote: [ -> ]This isn't really possible because the void Wispher works.
I've just added the void Monster and this void is broken because after adding this the Error appears
ohh ok

Thank you to both of you
It works
(02-26-2012, 06:16 PM)Shives Wrote: [ -> ]Thank you to both of you
It works

Great,good luck with your story!