JetlinerX
Senior Member
Posts: 599
Threads: 49
Joined: Jun 2011
Reputation:
19
|
RE: Errors on my errors?!
15,14 ERR: Expected "("
Still have an OnStart error also.
CURRENT 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?
(This post was last modified: 08-17-2011, 10:59 PM by JetlinerX.)
|
|
08-17-2011, 10:29 PM |
|
Obliviator27
Posting Freak
Posts: 792
Threads: 10
Joined: Jul 2011
Reputation:
66
|
RE: Errors on my errors?!
Well before I just fixed select parts of your script. This should be the fix for the whole thing.
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 ()
{
}
|
|
08-17-2011, 10:59 PM |
|
JetlinerX
Senior Member
Posts: 599
Threads: 49
Joined: Jun 2011
Reputation:
19
|
RE: Errors on my errors?!
I copy and pasted this exact code in:
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
(This post was last modified: 08-17-2011, 11:14 PM by JetlinerX.)
|
|
08-17-2011, 11:13 PM |
|
JenniferOrange
Senior Member
Posts: 424
Threads: 43
Joined: Jun 2011
Reputation:
33
|
RE: Errors on my errors?!
Your line 17 error is here:
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.
Ba-da bing, ba-da boom.
|
|
08-17-2011, 11:41 PM |
|
Obliviator27
Posting Freak
Posts: 792
Threads: 10
Joined: Jul 2011
Reputation:
66
|
RE: Errors on my errors?!
Bah! Blasted commas. So small and easy to miss.
|
|
08-17-2011, 11:43 PM |
|
Acies
Posting Freak
Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation:
73
|
RE: Errors on my errors?!
An error inside an error? Errception.
Line 17:
SetEntityActive("mainatticscare" bool abActive); <----- missing a comma
SetEntityActive("mainatticscare", bool abActive);
See if that solves it.
ジ
|
|
08-17-2011, 11:44 PM |
|
JenniferOrange
Senior Member
Posts: 424
Threads: 43
Joined: Jun 2011
Reputation:
33
|
RE: Errors on my errors?!
(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.
Ba-da bing, ba-da boom.
|
|
08-17-2011, 11:48 PM |
|
JetlinerX
Senior Member
Posts: 599
Threads: 49
Joined: Jun 2011
Reputation:
19
|
RE: Errors on my errors?!
ARGHHHHBqa]v[geihjw]e-hj]pHJbgnw!!!!!!!!!!!!!
Still no worky. Here are the NEW ERRORS
|
|
08-17-2011, 11:50 PM |
|
DRedshot
Senior Member
Posts: 374
Threads: 23
Joined: Jun 2011
Reputation:
11
|
RE: Errors on my errors?!
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
(This post was last modified: 08-17-2011, 11:53 PM by DRedshot.)
|
|
08-17-2011, 11:51 PM |
|
Acies
Posting Freak
Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation:
73
|
RE: Errors on my errors?!
(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
ジ
|
|
08-17-2011, 11:55 PM |
|
|