RE: Errors on my errors?! - JetlinerX - 08-17-2011
15,14 ERR: Expected "("
Still have an OnStart error also.
CURRENT CODE:
Code: void OnStart()
{
AddEntityCollideCallback("Player", "attic_sound_scare1", "OnStart", true, 1);
AddEntityCollideCallback("Player", "mainatticscare", "OnPickup", true, 1);
SetEntityPlayerInteractCallback("note_attic_desk", "OnTake", true);
}
void OnStart(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "amb_idle_whimp.snt", "attic_sound_scare1", 0.0f, true);
PlaySoundAtEntity("", "insanity_baby_cry.snt", "attic_sound_scare1", 0.0f, true);
PlaySoundAtEntity("", "door_level_cistern_close.snt", "attic_sound_scare1", 0.0f, true);
PlaySoundAtEntity("", "general_thunder.snt", "attic_sound_scare1", 0.0f, true);
PlaySoundAtEntity("", "break_stairs.snt", "attic_sound_scare1", 0.0f, true);
}
void OnPickup[b](string &in asEntity)[/b]
{
[b]SetEntityActive("mainatticscare");[/b]
CreateParticleSystemAtEntity("", "ps_dust_impact", "Partdoor1", false);
CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Partdoor1", false);
CreateParticleSystemAtEntity("", "ps_dust_impact", "Partdoor2", false);
CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Partdoor2", false);
CreateParticleSystemAtEntity("", "ps_dust_impact", "Partdoor3", false);
CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Partdoor3", false);
CreateParticleSystemAtEntity("", "ps_dust_impact", "Partdoor4", false);
CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Partdoor4", false);
PlaySoundAtEntity("", "lurker_hit_Wood", "Player", 0, false);
GiveSanityDamage(20, true);
AddPlayerBodyForce(-40000, 25000, 0, false);
FadePlayerRollTo(75, 3, 2);
StartPlayerLookAt("level_celler_1", 2, 2, "");
SetPlayerCrouching(true);
AddTimer("", 2, "Timer1");
AddTimer("", 10, "Timer2");
GivePlayerDamage(10, "BloodSplat", false, false);
SetLanternDisabled(true);
PlaySoundAtEntity("", "player_bodyfall", "Player", 0, false);
FadeRadialBlurTo(1, 0.5);
}
void Timer1(string &in asTimer)
{
StartPlayerLookAt("level_celler_1", 0.4, 0.4, "");
FadePlayerRollTo(-75, 3, 2);
AddTimer("", 2, "Timer3");
PlaySoundAtEntity("", "react_sigh", "Player", 0, false);
}
void Timer3(string &in asTimer)
{
PlaySoundAtEntity("", "react_sigh", "Player", 0, false);
StartPlayerLookAt("level_celler_1", 0.7, 0.7, "");
FadePlayerRollTo(0, 0, 0);
AddTimer("", 2, "Timer5");
FadeRadialBlurTo(0, 1);
}
void Timer5(string &in asTimer)
{
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
}
void Timer2(string &in asTimer)
{
SetPlayerCrouching(false);
StopPlayerLookAt();
SetLanternDisabled(false);
}
void OnLeave ()
{
}
Anyone got a solution?
RE: Errors on my errors?! - Obliviator27 - 08-17-2011
Well before I just fixed select parts of your script. This should be the fix for the whole thing.
Code: void OnStart()
{
AddEntityCollideCallback("Player", "attic_sound_scare1", "OnBegin", true, 1);
AddEntityCollideCallback("Player", "mainatticscare", "OnPickup", true, 1);
SetEntityPlayerInteractCallback("note_attic_desk", "OnTake", true);
}
void OnBegin(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "amb_idle_whimp.snt", "attic_sound_scare1", 0.0f, true);
PlaySoundAtEntity("", "insanity_baby_cry.snt", "attic_sound_scare1", 0.0f, true);
PlaySoundAtEntity("", "door_level_cistern_close.snt", "attic_sound_scare1", 0.0f, true);
PlaySoundAtEntity("", "general_thunder.snt", "attic_sound_scare1", 0.0f, true);
PlaySoundAtEntity("", "break_stairs.snt", "attic_sound_scare1", 0.0f, true);
}
void OnPickup(string &in asEntity)
{
SetEntityActive("mainatticscare");
CreateParticleSystemAtEntity("", "ps_dust_impact", "Partdoor1", false);
CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Partdoor1", false);
CreateParticleSystemAtEntity("", "ps_dust_impact", "Partdoor2", false);
CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Partdoor2", false);
CreateParticleSystemAtEntity("", "ps_dust_impact", "Partdoor3", false);
CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Partdoor3", false);
CreateParticleSystemAtEntity("", "ps_dust_impact", "Partdoor4", false);
CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Partdoor4", false);
PlaySoundAtEntity("", "lurker_hit_Wood", "Player", 0, false);
GiveSanityDamage(20, true);
AddPlayerBodyForce(-40000, 25000, 0, false);
FadePlayerRollTo(75, 3, 2);
StartPlayerLookAt("level_celler_1", 2, 2, "");
SetPlayerCrouching(true);
AddTimer("", 2, "Timer1");
AddTimer("", 10, "Timer2");
GivePlayerDamage(10, "BloodSplat", false, false);
SetLanternDisabled(true);
PlaySoundAtEntity("", "player_bodyfall", "Player", 0, false);
FadeRadialBlurTo(1, 0.5);
}
void Timer1(string &in asTimer)
{
StartPlayerLookAt("level_celler_1", 0.4, 0.4, "");
FadePlayerRollTo(-75, 3, 2);
AddTimer("", 2, "Timer3");
PlaySoundAtEntity("", "react_sigh", "Player", 0, false);
}
void Timer3(string &in asTimer)
{
PlaySoundAtEntity("", "react_sigh", "Player", 0, false);
StartPlayerLookAt("level_celler_1", 0.7, 0.7, "");
FadePlayerRollTo(0, 0, 0);
AddTimer("", 2, "Timer5");
FadeRadialBlurTo(0, 1);
}
void Timer5(string &in asTimer)
{
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
}
void Timer2(string &in asTimer)
{
SetPlayerCrouching(false);
StopPlayerLookAt();
SetLanternDisabled(false);
}
void OnLeave ()
{
}
RE: Errors on my errors?! - JetlinerX - 08-17-2011
I copy and pasted this exact code in:
Code: void OnStart()
{
AddEntityCollideCallback("Player", "attic_sound_scare1", "OnBegin", true, 1);
AddEntityCollideCallback("Player", "mainatticscare", "OnPickup", true, 1);
SetEntityPlayerInteractCallback("note_attic_desk", "OnTake", true);
}
void OnBegin(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "amb_idle_whimp.snt", "attic_sound_scare1", 0.0f, true);
PlaySoundAtEntity("", "insanity_baby_cry.snt", "attic_sound_scare1", 0.0f, true);
PlaySoundAtEntity("", "door_level_cistern_close.snt", "attic_sound_scare1", 0.0f, true);
PlaySoundAtEntity("", "general_thunder.snt", "attic_sound_scare1", 0.0f, true);
PlaySoundAtEntity("", "break_stairs.snt", "attic_sound_scare1", 0.0f, true);
}
void OnPickup(string &in asEntity)
{
SetEntityActive("mainatticscare" bool abActive);
CreateParticleSystemAtEntity("", "ps_dust_impact", "Partdoor1", false);
CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Partdoor1", false);
CreateParticleSystemAtEntity("", "ps_dust_impact", "Partdoor2", false);
CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Partdoor2", false);
CreateParticleSystemAtEntity("", "ps_dust_impact", "Partdoor3", false);
CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Partdoor3", false);
CreateParticleSystemAtEntity("", "ps_dust_impact", "Partdoor4", false);
CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Partdoor4", false);
PlaySoundAtEntity("", "lurker_hit_Wood", "Player", 0, false);
GiveSanityDamage(20, true);
AddPlayerBodyForce(-40000, 25000, 0, false);
FadePlayerRollTo(75, 3, 2);
StartPlayerLookAt("level_celler_1", 2, 2, "");
SetPlayerCrouching(true);
AddTimer("", 2, "Timer1");
AddTimer("", 10, "Timer2");
GivePlayerDamage(10, "BloodSplat", false, false);
SetLanternDisabled(true);
PlaySoundAtEntity("", "player_bodyfall", "Player", 0, false);
FadeRadialBlurTo(1, 0.5);
}
void Timer1(string &in asTimer)
{
StartPlayerLookAt("level_celler_1", 0.4, 0.4, "");
FadePlayerRollTo(-75, 3, 2);
AddTimer("", 2, "Timer3");
PlaySoundAtEntity("", "react_sigh", "Player", 0, false);
}
void Timer3(string &in asTimer)
{
PlaySoundAtEntity("", "react_sigh", "Player", 0, false);
StartPlayerLookAt("level_celler_1", 0.7, 0.7, "");
FadePlayerRollTo(0, 0, 0);
AddTimer("", 2, "Timer5");
FadeRadialBlurTo(0, 1);
}
void Timer5(string &in asTimer)
{
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
}
void Timer2(string &in asTimer)
{
SetPlayerCrouching(false);
StopPlayerLookAt();
SetLanternDisabled(false);
}
void OnLeave ()
{
}
And Still have the OnStart error, and an "Expected , or ; ERR" On line 17
RE: Errors on my errors?! - JenniferOrange - 08-17-2011
Your line 17 error is here:
Code: void OnStart()
{
AddEntityCollideCallback("Player", "attic_sound_scare1", "OnBegin", true, 1);
AddEntityCollideCallback("Player", "mainatticscare", "OnPickup", true, 1);
SetEntityPlayerInteractCallback("note_attic_desk", "OnTake", true);
}
void OnBegin(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "amb_idle_whimp.snt", "attic_sound_scare1", 0.0f, true);
PlaySoundAtEntity("", "insanity_baby_cry.snt", "attic_sound_scare1", 0.0f, true);
PlaySoundAtEntity("", "door_level_cistern_close.snt", "attic_sound_scare1", 0.0f, true);
PlaySoundAtEntity("", "general_thunder.snt", "attic_sound_scare1", 0.0f, true);
PlaySoundAtEntity("", "break_stairs.snt", "attic_sound_scare1", 0.0f, true);
}
void OnPickup(string &in asEntity)
{
[b]SetEntityActive("mainatticscare", bool abActive);[/b]
CreateParticleSystemAtEntity("", "ps_dust_impact", "Partdoor1", false);
CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Partdoor1", false);
CreateParticleSystemAtEntity("", "ps_dust_impact", "Partdoor2", false);
CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Partdoor2", false);
CreateParticleSystemAtEntity("", "ps_dust_impact", "Partdoor3", false);
CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Partdoor3", false);
CreateParticleSystemAtEntity("", "ps_dust_impact", "Partdoor4", false);
CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Partdoor4", false);
PlaySoundAtEntity("", "lurker_hit_Wood", "Player", 0, false);
GiveSanityDamage(20, true);
AddPlayerBodyForce(-40000, 25000, 0, false);
FadePlayerRollTo(75, 3, 2);
StartPlayerLookAt("level_celler_1", 2, 2, "");
SetPlayerCrouching(true);
AddTimer("", 2, "Timer1");
AddTimer("", 10, "Timer2");
GivePlayerDamage(10, "BloodSplat", false, false);
SetLanternDisabled(true);
PlaySoundAtEntity("", "player_bodyfall", "Player", 0, false);
FadeRadialBlurTo(1, 0.5);
}
void Timer1(string &in asTimer)
{
StartPlayerLookAt("level_celler_1", 0.4, 0.4, "");
FadePlayerRollTo(-75, 3, 2);
AddTimer("", 2, "Timer3");
PlaySoundAtEntity("", "react_sigh", "Player", 0, false);
}
void Timer3(string &in asTimer)
{
PlaySoundAtEntity("", "react_sigh", "Player", 0, false);
StartPlayerLookAt("level_celler_1", 0.7, 0.7, "");
FadePlayerRollTo(0, 0, 0);
AddTimer("", 2, "Timer5");
FadeRadialBlurTo(0, 1);
}
void Timer5(string &in asTimer)
{
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
}
void Timer2(string &in asTimer)
{
SetPlayerCrouching(false);
StopPlayerLookAt();
SetLanternDisabled(false);
}
void OnLeave ()
{
}
You forgot the comma.
RE: Errors on my errors?! - Obliviator27 - 08-17-2011
Bah! Blasted commas. So small and easy to miss.
RE: Errors on my errors?! - Acies - 08-17-2011
An error inside an error? Errception.
Line 17:
SetEntityActive("mainatticscare" bool abActive); <----- missing a comma
SetEntityActive("mainatticscare", bool abActive);
See if that solves it.
RE: Errors on my errors?! - JenniferOrange - 08-17-2011
(08-17-2011, 11:44 PM)Acies Wrote: An error inside an error? Errception.
Line 17:
SetEntityActive("mainatticscare" bool abActive); <----- missing a comma
SetEntityActive("mainatticscare", bool abActive);
See if that solves it.
I beat you, already adressed that. 
RE: Errors on my errors?! - JetlinerX - 08-17-2011
ARGHHHHBqa]v[geihjw]e-hj]pHJbgnw!!!!!!!!!!!!!
Still no worky. Here are the NEW ERRORS 
RE: Errors on my errors?! - DRedshot - 08-17-2011
usually when you get an OnStart() error, it is a bit misleading. You should solve your other error before even thinking about the OnStart error, as this will probably fix itself when you fix the other problem.
"expected , or ;" means exactly what it says. It expected a comma, but never found one. take another look at line 17. you have forgot to put a comma between the name, and the bool value. - ( which should be either true or false btw)
SetEntityActive("mainatticscare" , true); // this sets "mainatticscare" active
SetEntityActive("mainatticscare" , false); // this sets "mainatticscare" inactive
edit: i was pretty late but "expected expression value" means it expected a value. you just put "bool abActive" which is not a bool value. bool is either true or false 
RE: Errors on my errors?! - Acies - 08-17-2011
(08-17-2011, 11:48 PM)JenniferOrange Wrote: I beat you, already adressed that. 
(08-17-2011, 11:51 PM)DRedshot Wrote: SetEntityActive("mainatticscare" , true); // this sets "mainatticscare" active
SetEntityActive("mainatticscare" , false); // this sets "mainatticscare" inactive
Nobody gets the cake
|