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
#1
Errors on my errors?!

Anyone know what I did wrong? Heres the errors:
[Image: dwadwadawd.png]

And heres the script:

void OnStart()
{
        AddEntityCollideCallback("Player", "attic_sound_scare1", "OnStart", true, 1);
        SetEntityPlayerInteractCallback("note_attic_desk", "OnPickup", true);
        AddEntityCollideCallback("Player", "mainatticscare", "OnPickup", true, 1);
}
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(string &in parent, string &in child, int state)
{
     if (parent == "Player" && child == "note_attic_desk")
     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 ()
{
}

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

08-17-2011, 09:22 PM
Website Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Errors on my errors?!

I think it would be easier for the both of us in helping you understand the error itself. When it says "no matching signatures to <function here>" it means it couldn't find that exact function, neither in your script nor from the game itself. This is often due to a misspelling of the function name or not filling in all the required parameters to the targeted function. Parameters are those you pass into the function (what goes inside the parentheses).

I should also note, it is often better if you read the error message from bottom to top. In this case, what is wrong with SetEntityActive() in your script? Is there anything missing from it? Wink

Tutorials: From Noob to Pro
08-17-2011, 09:43 PM
Website Find
JetlinerX Offline
Senior Member

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

Eh... I am not sure, as I have said before, I am still decently new to scripts. Sooo... I am honestly not sure whats wrong?

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

08-17-2011, 09:46 PM
Website Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Errors on my errors?!

(08-17-2011, 09:46 PM)JetlinerX Wrote: Eh... I am not sure, as I have said before, I am still decently new to scripts. Sooo... I am honestly not sure whats wrong?

Can you tell me the difference between the one in your script and the one here: http://wiki.frictionalgames.com/hpl2/amn...s#entities ?

Tutorials: From Noob to Pro
08-17-2011, 09:50 PM
Website Find
JetlinerX Offline
Senior Member

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

The "bool abActive);"?

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

08-17-2011, 09:58 PM
Website Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#6
RE: Errors on my errors?!

(08-17-2011, 09:58 PM)JetlinerX Wrote: The "bool abActive);"?

Correct. Big Grin

Tutorials: From Noob to Pro
08-17-2011, 10:00 PM
Website Find
JetlinerX Offline
Senior Member

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

YAY! Now what about the OnStart error?! Big Grin

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

08-17-2011, 10:06 PM
Website Find
Obliviator27 Offline
Posting Freak

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

Rename your second function.
08-17-2011, 10:10 PM
Find
JetlinerX Offline
Senior Member

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

Also, its saying that there was an "Expected ( on line 19" Eh?
Still didnt fix the OnStart error by changing the name.

Lead Developer of "The Attic"
~Slade Mitchell

Chapter 3 (REL)

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

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

(08-17-2011, 10:11 PM)JetlinerX Wrote: Also, its saying that there was an "Expected ( on line 19" Eh?

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);
}
As you didn't have an else statement, I removed the if statement entirely, though perhaps you'll need it for a later use. Also, your syntax for AddEntityPlayerInteractCallback was incorrect.
08-17-2011, 10:21 PM
Find




Users browsing this thread: 1 Guest(s)