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
What means unexpected identifier?
Shives Offline
Member

Posts: 154
Threads: 41
Joined: Jan 2012
Reputation: 1
#6
RE: What means unexpected identifier?

My Script

The Error says it is in line 112.

The red line is line 112, I can't see a mistake there Huh

////////////////////////////
// Run first time starting map
void OnStart()
{
SetEntityCallbackFunc("Caution", "Note");
AddUseItemCallback("", "Key_1", "Door_1", "Schlussel", true);
AddUseItemCallback("", "Key_2", "Door_2", "Keyratsel", true);
AddEntityCollideCallback("Player", "Area_2", "VaseofTerror", true, 1);
AddEntityCollideCallback("Player", "Area_3", "Grunt", true, 1);
AddEntityCollideCallback("Player", "Area_1", "Bild", true, 1);
AddEntityCollideCallback("Player", "Area_5", "R", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_1", "Quitsch", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "Boom", true, 1);
AddEntityCollideCallback("Player", "Area_4", "Roar", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_11", "out", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_14", "guardia", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "noise", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "feet", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_7", "piano", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_6", "idle", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_5", "runta", true, 1);
AddEntityCollideCallback("vase02_1", "ScriptArea_16", "sanity", true, 1);
}
void Note(string &in asEntity, string &in type)
{
SetEntityActive("Area_4", true);
}
void Schlussel(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Door_1", false, true);
PlaySoundAtEntity("", "unlock_door", "Door_1", 0, false);
RemoveItem("Key_1");
}
void Keyratsel(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Door_2", false, true);
PlaySoundAtEntity("", "unlock_door", "Door_2", 0, false);
RemoveItem("Key_2");
}
void VaseofTerror(string &in asParent, string &in asChild, int alState)
{
AddPropImpulse("Vase", -5, 0, -8, "world");
GiveSanityDamage(9.0f, true);
}
void Grunt(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Grunt_1", true);
ShowEnemyPlayerPosition("Grunt_1");
}
void Bild(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("ScriptArea_7", true);
SetEntityActive("piano_1", false);
GiveSanityDamage(9.0f, true);
SetEntityActive("piano_1", false);
SetEntityActive("Pot", false);
PlaySoundAtEntity("", "guardian_distant1.snt", "Player", 0, false);
StartScreenShake(0.2f, 3, 0.3f, 0.2f);
SetEntityActive("S_1", true);
SetEntityActive("S_2", true);
SetEntityActive("S_3", true);
SetEntityActive("S_4", true);
SetEntityActive("S_5", true);
SetEntityActive("S_6", true);
SetEntityActive("S_7", true);
SetEntityActive("S_8", true);
SetEntityActive("S_9", true);
}
void R(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("armour_nice_complete_1", true);
SetEntityActive("armour_nice_complete_2", true);
SetEntityActive("armour_nice_complete_3", true);
SetEntityActive("armour_nice_complete_4", true);
SetEntityActive("armour_nice_complete_5", true);
SetEntityActive("armour_nice_complete_6", true);
SetEntityActive("armour_nice_complete_7", true);
GiveSanityDamage(100.0f, true);
}
void Quitsch(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage( 4, true);
SetSwingDoorDisableAutoClose("mansion_2", true);
SetSwingDoorClosed("mansion_2",false, true);
AddPropForce("mansion_2", 0, 0, 900, "world");
PlaySoundAtEntity("", "Door.snt", "Player", 0, false);
}
void Boom(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage( 4, true);
CreateParticleSystemAtEntity("", "ps_door_damage_wood.ps", "particle_1", false);
CreateParticleSystemAtEntity("", "ps_dust_impact_vert.ps", "particle_1", false);
AddPropForce("Door_2", 0, 0, 1000, "world");
PlaySoundAtEntity("", "hit_wood.snt", "Player", 0, false);
AddTimer("", 1, "Boom_2");
}
void Boom_2(string &in asTimer)
{
GiveSanityDamage( 4, true);
CreateParticleSystemAtEntity("", "ps_door_damage_wood.ps", "particle_1", false);
CreateParticleSystemAtEntity("", "ps_dust_impact_vert.ps", "particle_1", false);
AddPropForce("Door_2", 0, 0, 1000, "world");
PlaySoundAtEntity("", "hit_wood.snt", "Player", 0, false);
}
void Roar(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "Monster.snt", "Player", 0, false);
StartScreenShake(0.4f, 4, 0.3f, 0.5f);
CreateParticleSystemAtEntity("", "ps_dust_break_25.ps", "particle_1", false);
GiveSanityDamage( 1.0f, true);
}
void out(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "11_owl.snt", "ScriptArea_13", 0, false);
GiveSanityDamage( 1.0f, true);
}
void guardia(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "11_forest_minor.snt", "ScriptArea_15", 0, false);
GiveSanityDamage( 1.0f, true);
}
void noise(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "guardian_distant2.snt", "ScriptArea_9", 0, false);
GiveSanityDamage( 1.0f, true);
}
void feet(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "04_big_feet.snt", "ScriptArea_10", 0, false);
}
void piano(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "general_piano02.snt", "Player", 0, false);
}
void idle(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "amb_idle_whimp.snt", "ScriptArea_8", 0, false);
}
void runta(string &in asParent, string &in asChild, int alState)
{
AddPropImpulse("vase02_1", 0, 0, 2, "world");
}
void sanity(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage( 1.0f, true);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
PlayMusic("16_amb.ogg", true, 0.7, 3, 0, true);
FadeOut(0);
FadeIn(8);
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

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

Sorry for bad English


04-29-2012, 11:39 AM
Find


Messages In This Thread
What means unexpected identifier? - by Shives - 04-29-2012, 09:42 AM
RE: What means unexpected identifier? - by Shives - 04-29-2012, 10:55 AM
RE: What means unexpected identifier? - by Shives - 04-29-2012, 11:39 AM



Users browsing this thread: 1 Guest(s)