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
No matching signatures to 'OnStart()'
Lizard Offline
Member

Posts: 174
Threads: 23
Joined: Jul 2012
Reputation: 5
#1
No matching signatures to 'OnStart()'

Hey guys my game keeps saying that a signature is missing for OnStart and that there is an Unexpected end of file on the end of void OnLeave()

Can you help me on this one?

//////////////////////////////
//Run first entering map
void OnStart()
{
AddEntityCollideCallback("Player", "LightOutArea_1", "KillTheLight", true, 1);
AddEntityCollideCallback("Player", "ArmourArea_1", "ArmourScare", true, 1);
SetEntityPlayerInteractCallback("potion_sanity_1", "ActivateArea", true);
AddEntityCollideCallback("Player", "ArmourArea_2", "ArmourScare2", true, 1);
AddUseItemCallback("", "key_torture_chamber_1", "prison_4", "UsedKeyOnDoor", true);
}

void KillTheLight(string &in asParent, string &in asChild, int alState)
{
SetLampLit("torch_static01_1", false, true);
SetLampLit("torch_static01_2", false, true);
SetLampLit("torch_static01_3", false, true);
SetLampLit("torch_static01_4", false, true);
SetLampLit("torch_static01_5", false, true);
SetLampLit("torch_static01_6", false, true);
SetLampLit("torch_static01_7", false, true);
SetLampLit("torch_static01_8", false, true);
SetLampLit("torch_static01_9", false, true);
SetLampLit("torch_static01_10", false, true);
SetLampLit("torch_static01_11", false, true);
SetLampLit("torch_static01_12", false, true);
SetLampLit("torch_static01_13", false, true);
SetLampLit("torch_static01_14", false, true);
SetLampLit("torch_static01_15", false, true);
SetLampLit("torch_static01_16", false, true);
PlaySoundAtEntity("", "scare_wind", "Player", 0, false);
GiveSanityDamage(10, true);
}

void ArmourScare(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("armour_rusty_complete_1", true);
SetEntityActive("armour_rusty_complete_4", true);
PlaySoundAtEntity("", "24_iron_maiden", "Player", 0, false);
GiveSanityDamage(10, true);
}

void ActivateArea(string &in asEntity)
{
SetEntityActive("ArmourArea_2", true);
}

void ArmourScare2(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("armour_rusty_complete_2", true);
SetEntityActive("armour_rusty_complete_3", true);
SetEntityActive("armour_rusty_complete_1", false);
SetEntityActive("armour_rusty_complete_4", false);
PlaySoundAtEntity("", "24_iron_maiden", "Player", 0, false);
GiveSanityDamage(10, true);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity
{
SetSwingDoorLocked("prison_4", false, true);
PlaySoundAtEntity("", "unlock_door", "prison_4", 0, false);
RemoveItem("key_torture_chamber_1");
}

//////////////////////////////
//Run when entering map
void OnEnter()
{

}

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

}

CURRENT PROJECT:
A Fathers Secret == Just started
(This post was last modified: 07-13-2012, 04:42 PM by Lizard.)
07-13-2012, 03:58 PM
Find
Rapture Offline
Posting Freak

Posts: 1,078
Threads: 79
Joined: May 2011
Reputation: 30
#2
RE: No matching signatures to 'OnStart()'

You forget the end parentheses on void UsedKeyOnDoor(string &in asItem, string &in asEntity
07-13-2012, 04:36 PM
Find
Lizard Offline
Member

Posts: 174
Threads: 23
Joined: Jul 2012
Reputation: 5
#3
RE: No matching signatures to 'OnStart()'

thanks

CURRENT PROJECT:
A Fathers Secret == Just started
07-13-2012, 04:38 PM
Find
Ongka Offline
Member

Posts: 225
Threads: 3
Joined: Nov 2010
Reputation: 20
#4
RE: No matching signatures to 'OnStart()'

Just something to make the script clearer:
            for(int i=1;i<=16;i++)
            {
            SetLampLit("torch_static01_"+i, false, true);
            }
Put this instead of the 16 lines into KillTheLight.
It does the same but takes up less space.

[Image: 18694.png]
(This post was last modified: 07-13-2012, 08:21 PM by Ongka.)
07-13-2012, 08:20 PM
Find




Users browsing this thread: 2 Guest(s)