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
Strange Error
Shives Offline
Member

Posts: 154
Threads: 41
Joined: Jan 2012
Reputation: 1
#1
Strange Error

Hi
If I want to load a map this happens

Fatal Error:
main(95,7) :ERR Big Grinata type can't be 'void'
main(95,20) :ERR :Only objects have constructors
main(110,2) :ERR :No matching signatures to 'EnemyDissapea()'

I know what No matching signatures means but I don't know the other Errors.

My Script:
////////////////////////////
// Run first time starting map
void OnStart()
{
SetEntityPlayerInteractCallback("Door_1", "func_slam", true);
AddEntityCollideCallback("Player", "Area_1", "func_slam", true, 1);
AddEntityCollideCallback("Player", "Area_3", "Push", true, 1);
SetEntityCallbackFunc("Key_1", "Teleport");
AddEntityCollideCallback("Player", "Trigger_3", "hanger", true, 1);
AddUseItemCallback("", "Key_1", "cabinet", "Schlussel", true);
AddUseItemCallback("", "Key_2", "Tisch", "Tischunlock", true);
AddEntityCollideCallback("Player", "ScriptArea_2", "Wind", true, 1);
AddEntityCollideCallback("servant_brute_1", "ScriptArea_4", "Enemy", false, 1);
}


void func_slam(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage( 4, true);
PlaySoundAtEntity("", "break_glass_bottle.snt", "Player", 0, false);
}
void Push(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
GiveSanityDamage( 4, true);
PlayMusic("stayout.ogg", false, 70, 0, 0, true);
SetSwingDoorDisableAutoClose("Door_2", true);
SetSwingDoorClosed("Door_2",false, true);
AddPropForce("Door_2", -12200, 0, 0, "world");
CreateParticleSystemAtEntity("", "ps_dust_paper_blow.ps", "particle", false);
PlaySoundAtEntity("", "scare_wind.snt", "Player", 0, false);
}
void Teleport(string &in asEntity, string &in type)
{
  AddTimer("", 2, "Brute");
}
  void Brute(string &in asTimer)
{
SetEntityActive("servant_brute_1", true);
SetEntityActive("Trigger_3", true);
SetEntityActive("closet", true);
  AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 0, "");
  AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 0, "");
  AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_3", 0, "");
  AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_4", 0, "");
  AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_5", 0, "");
  AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_6", 0, "");
  AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_7", 0, "");
  AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_8", 0, "");
  AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_9", 0, "");
  AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_10", 0, "");
  AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_11", 0, "");
  AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_12", 0, "");
  AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_13", 0, "");
  AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_14", 0, "");
  AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_15", 0, "");
  AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_16", 0, "");
  AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_17", 0, "");
  AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_18", 0, "");
  AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_19", 0, "");
  AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_20", 0, "");
  AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_21", 0, "");
  AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_22", 0, "");
  AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_23", 0, "");
}
void hanger(string &in asParent, string &in asChild, int alState)
{
  PlaySoundAtEntity("", "guardian_distant1.snt", "Player", 0, false);
}
void Schlussel(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("cabinet", false, true);
PlaySoundAtEntity("", "unlock_door", "cabinet", 0, false);
RemoveItem("Key_1");
}
void Tischunlock(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Tisch", false, true);
PlaySoundAtEntity("", "unlock_door", "cabinet", 0, false);
RemoveItem("Key_2");
}
void Wind(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "scare_wind.snt", "cabinet", 0, false);
CreateParticleSystemAtEntity("", "ps_dust_push_15.ps", "ScriptArea_3", false);
AddPropImpulse("bag02_2", 1, 0, 0, "world");
}
void Enemy(string &in asParent, string &in asChild, int alState)
{
AddEntityCollideCallback("Player", "closet", "Var", false, 1);
AddTimer("", 2, "EnemyDissapear");
}
void EnemyDissapear(string &in asTimer)
{
void EnemyDissapea();
{
  if(GetLocalVarInt("Var01") == 1)
   {
    FadeEnemyToSmoke("servant_brute_1", true);
   }
else
{
  AddTimer("", 2, "Brute");
}
}
}    
void Var(string &in asParent, string &in asChild, int alState)
{
    AddLocalVarInt("Var01", 1);
    EnemyDissapea();
}
////////////////////////////
// Run when entering map

My Custom Story
http://www.frictionalgames.com/forum/thread-12587.html

Sorry for bad English


03-25-2012, 07:38 PM
Find
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#2
RE: Strange Error

I dont know about the others but shouldnt the
void EnemyDissapear(string &in asTimer)
{
void EnemyDissapea();

be
void EnemyDissapear(string &in asTimer)
{
void EnemyDissapear();

You didnt seem to have the r in the end.
+ There seems to be 2 voids right on top of each other.

(This post was last modified: 03-25-2012, 07:52 PM by Datguy5.)
03-25-2012, 07:52 PM
Find
Shives Offline
Member

Posts: 154
Threads: 41
Joined: Jan 2012
Reputation: 1
#3
RE: Strange Error

It's a bit puzzled but It's a long Story why I have a EnemyDissapear void and a EnemyDissapea void Big Grin
But No Enemy Dissapea is right,it have to be something else

My Custom Story
http://www.frictionalgames.com/forum/thread-12587.html

Sorry for bad English


03-25-2012, 08:01 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: Strange Error

You can't define functions within a function.

Tutorials: From Noob to Pro
03-25-2012, 08:37 PM
Website Find
Shives Offline
Member

Posts: 154
Threads: 41
Joined: Jan 2012
Reputation: 1
#5
RE: Strange Error

Now it says "Unexpected token "{" "

or was it "}" :S

My Custom Story
http://www.frictionalgames.com/forum/thread-12587.html

Sorry for bad English


(This post was last modified: 03-27-2012, 01:04 PM by Shives.)
03-27-2012, 01:02 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#6
RE: Strange Error

Post your updated script.

03-28-2012, 07:23 AM
Find
Shives Offline
Member

Posts: 154
Threads: 41
Joined: Jan 2012
Reputation: 1
#7
RE: Strange Error

////////////////////////////
// Run first time starting map
void OnStart()
{
SetEntityPlayerInteractCallback("Door_1", "func_slam", true);
AddEntityCollideCallback("Player", "Area_1", "func_slam", true, 1);
AddEntityCollideCallback("Player", "Area_3", "Push", true, 1);
SetEntityCallbackFunc("Key_1", "Teleport");
AddEntityCollideCallback("Player", "Trigger_3", "hanger", true, 1);
AddUseItemCallback("", "Key_1", "cabinet", "Schlussel", true);
AddUseItemCallback("", "Key_2", "Tisch", "Tischunlock", true);
AddEntityCollideCallback("Player", "ScriptArea_2", "Wind", true, 1);
AddEntityCollideCallback("servant_brute_1", "ScriptArea_4", "Enemy", false, 1);
}


void func_slam(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage( 4, true);
PlaySoundAtEntity("", "break_glass_bottle.snt", "Player", 0, false);
}
void Push(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "react_pant.snt", "Player", 0, false);
GiveSanityDamage( 4, true);
PlayMusic("stayout.ogg", false, 70, 0, 0, true);
SetSwingDoorDisableAutoClose("Door_2", true);
SetSwingDoorClosed("Door_2",false, true);
AddPropForce("Door_2", -12200, 0, 0, "world");
CreateParticleSystemAtEntity("", "ps_dust_paper_blow.ps", "particle", false);
PlaySoundAtEntity("", "scare_wind.snt", "Player", 0, false);
}
void Teleport(string &in asEntity, string &in type)
{
AddTimer("", 2, "Brute");
}
void Brute(string &in asTimer)
{
SetEntityActive("servant_brute_1", true);
SetEntityActive("Trigger_3", true);
SetEntityActive("closet", true);
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_9", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_10", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_11", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_12", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_13", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_14", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_15", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_16", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_17", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_18", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_19", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_20", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_21", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_22", 0, "");
AddEnemyPatrolNode("servant_brute_1", "PathNodeArea_23", 0, "");
}
void hanger(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "guardian_distant1.snt", "Player", 0, false);
}
void Schlussel(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("cabinet", false, true);
PlaySoundAtEntity("", "unlock_door", "cabinet", 0, false);
RemoveItem("Key_1");
}
void Tischunlock(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("Tisch", false, true);
PlaySoundAtEntity("", "unlock_door", "cabinet", 0, false);
RemoveItem("Key_2");
}
void Wind(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "scare_wind.snt", "cabinet", 0, false);
CreateParticleSystemAtEntity("", "ps_dust_push_15.ps", "ScriptArea_3", false);
AddPropImpulse("bag02_2", 1, 0, 0, "world");
}
void Enemy(string &in asParent, string &in asChild, int alState)
{
AddLocalVarInt("Var01", 1);
AddEntityCollideCallback("Player", "closet", "Var", false, 1);
EnemyDissapea();
}
void EnemyDissapea();
{
if(GetLocalVarInt("Var01") == 2)
{
FadeEnemyToSmoke("servant_brute_1", true);
}
else
{
AddTimer("", 2, "Brute");
}
}

void Var(string &in asParent, string &in asChild, int alState)
{
AddLocalVarInt("Var01", 1);
EnemyDissapea();
}
////////////////////////////
// Run when entering map
void OnEnter()
{

}

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

}

My Custom Story
http://www.frictionalgames.com/forum/thread-12587.html

Sorry for bad English


03-30-2012, 11:56 AM
Find




Users browsing this thread: 1 Guest(s)