Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ERR Expected identifier
Shives Offline
Member

Posts: 154
Threads: 41
Joined: Jan 2012
Reputation: 1
#1
ERR Expected identifier

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()

My Custom Story
http://www.frictionalgames.com/forum/thread-12587.html

Sorry for bad English


(This post was last modified: 02-26-2012, 05:42 PM by Shives.)
02-26-2012, 05:36 PM
Find
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#2
RE: ERR Expected identifier

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

(This post was last modified: 02-26-2012, 05:40 PM by Datguy5.)
02-26-2012, 05:38 PM
Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#3
RE: ERR Expected identifier

You have numbers as function names. You'll want to change those to actual names. It's the only issue I can immediately locate.

02-26-2012, 05:42 PM
Find
Shives Offline
Member

Posts: 154
Threads: 41
Joined: Jan 2012
Reputation: 1
#4
RE: ERR Expected identifier

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

My Custom Story
http://www.frictionalgames.com/forum/thread-12587.html

Sorry for bad English


02-26-2012, 05:46 PM
Find
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#5
RE: ERR Expected identifier

(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


02-26-2012, 06:03 PM
Find
Shives Offline
Member

Posts: 154
Threads: 41
Joined: Jan 2012
Reputation: 1
#6
RE: ERR Expected identifier

Thank you to both of you
It works

My Custom Story
http://www.frictionalgames.com/forum/thread-12587.html

Sorry for bad English


02-26-2012, 06:16 PM
Find
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#7
RE: ERR Expected identifier

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

Great,good luck with your story!

02-26-2012, 07:05 PM
Find




Users browsing this thread: 1 Guest(s)