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
Errors on my errors?!
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#11
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?

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

(This post was last modified: 08-17-2011, 10:59 PM by JetlinerX.)
08-17-2011, 10:29 PM
Website Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#12
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
Find
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#13
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

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

(This post was last modified: 08-17-2011, 11:14 PM by JetlinerX.)
08-17-2011, 11:13 PM
Website Find
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#14
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. Smile

Ba-da bing, ba-da boom.
08-17-2011, 11:41 PM
Find
Obliviator27 Offline
Posting Freak

Posts: 792
Threads: 10
Joined: Jul 2011
Reputation: 66
#15
RE: Errors on my errors?!

Bah! Blasted commas. So small and easy to miss.
08-17-2011, 11:43 PM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#16
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.

[Image: mZiYnxe.png]


08-17-2011, 11:44 PM
Find
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#17
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. Big Grin


Ba-da bing, ba-da boom.
08-17-2011, 11:48 PM
Find
JetlinerX Offline
Senior Member

Posts: 599
Threads: 49
Joined: Jun 2011
Reputation: 19
#18
RE: Errors on my errors?!

ARGHHHHBqa]v[geihjw]e-hj]pHJbgnw!!!!!!!!!!!!!

Still no worky. Here are the NEW ERRORS Big Grin
[Image: awdawdj.png]

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

08-17-2011, 11:50 PM
Website Find
DRedshot Offline
Senior Member

Posts: 374
Threads: 23
Joined: Jun 2011
Reputation: 11
#19
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 Tongue 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 Smile



(This post was last modified: 08-17-2011, 11:53 PM by DRedshot.)
08-17-2011, 11:51 PM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#20
RE: Errors on my errors?!

(08-17-2011, 11:48 PM)JenniferOrange Wrote: I beat you, already adressed that. Big Grin

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

[Image: mZiYnxe.png]


08-17-2011, 11:55 PM
Find




Users browsing this thread: 1 Guest(s)