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
Script Error
giacomo9 Offline
Junior Member

Posts: 37
Threads: 11
Joined: Nov 2012
Reputation: 0
#1
Script Error

I have this error:

ExcecuteString(1,1):ERR:No matching signatures to 'OnEnter'
ExcecuteString(1,1):ERR:No matching signatures to 'OnLeave'
Main(108,1):ERR:Unexpected end of file

What's wrong? Here is complete script:

// This runs when the map first starts=================
void OnStart()
{
AddEntityCollideCallback("Player", "advice", "startadvice", true, 1);
AddEntityCollideCallback("Player", "stopamb", "silence", true, 1);
AddEntityCollideCallback("Player", "afteroil", "afteroilscare", true, 1);
AddEntityCollideCallback("Player", "jebac", "jeebac", true, 1);
AddEntityCollideCallback("Player", "ciach", "gameover1", true, 1);
AddEntityCollideCallback("Player", "ciach_1", "gameover1", true, 1);
AddEntityCollideCallback("Player", "maze2", "saw", true, 1);
AddEntityCollideCallback("Player", "schiza", "startschiza", true, 1);
AddEntityCollideCallback("Player", "baby", "babycry", true, 1);
AddEntityCollideCallback("Player", "maze1", "scary1", true, 1);
AddEntityCollideCallback("Player", "swinie", "swiniescary", true, 1);
AddUseItemCallback("", "exitkey", "exitdoor", "exitunlock", true);
AddUseItemCallback("", "beforekey", "beforedoor", "beforeunlock", true);
SetEntityCallbackFunc("potion_oil_large_5", "OnPickup");
}

void gameover1(string &in asParent, string &in asChild, int alState)
{
GivePlayerDamage(25, Slash, true, false);
)

void silence(string &in asParent, string &in asChild, int alState)
{
StopMusic(0, 5);
)

void gameover2(string &in asParent, string &in asChild, int alState)
{
GivePlayerDamage(25, Slash, true, false);
)


void afteroilscare(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("corpse_male_3", true);
AddPropForce("corpse_male_3, 10000, 0, 0, "world");
PlaySoundAtEntity("", "24_iron_maiden.snt", "Player", 0, false);
}


void startadvice(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "lastivo.snt", "Player", 0, false);
AddTimer("", 47, "openlast");
}

void startschiza(string &in asParent, string &in asChild, int alState)
{
PlayMusic("auditory.ogg", true, 1, 0, 5, false);
}

void babycry(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "insanity_baby_cry.snt", "Player", 0, false);
}

void saw(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "23_saw_voice2.snt", "Player", 0, false);
}

void openlast(string &in asTimer)
{
SetEntityActive("prison_1", false);
SetEntityActive("prison_2", true);
PlaySoundAtEntity("", "unlock_door.snt", "Player", 0, false);
}

void scary1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("corpse_male_2", true);
PlaySoundAtEntity("", "24_iron_maiden.snt", "Player", 0, false);
}

void jeebac(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("swinie", true);
}

void swiniescary(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("prosie", true);
PlaySoundAtEntity("", "jebacswinie.snt", "Player", 0, false);
}

void exitunlock(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("exitdoor", false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
}

void beforeunlock(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("beforedoor", false, true);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
}

void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("afteroil", true);
)
08-23-2014, 01:31 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#2
RE: Script Error

GivePlayerDamage(25, "Slash", true, false);
You forgot to add quotes in Slash at the callback function gameover1 and gameover2, Line 22 and 32 respectively.

EDIT:
AddPropForce("corpse_male_3", 10000, 0, 0, "world");
You forgot that closing quote in AddPropForce in the callback function AfterOilScare, Line 39.

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 08-23-2014, 01:48 PM by PutraenusAlivius.)
08-23-2014, 01:43 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#3
RE: Script Error

Some of your voids have closing brackets instead of closing braces.

PHP Code: (Select All)
void gameover1(string &in asParentstring &in asChildint alState)
{
GivePlayerDamage(25Slashtruefalse);
)  
//Here's one. Make it a } instead of a ).

void silence(string &in asParentstring &in asChildint alState)
{
StopMusic(05);
)  
//Another.

void gameover2(string &in asParentstring &in asChildint alState)
{
GivePlayerDamage(25Slashtruefalse);
//Another.

//More code.

void OnPickup(string &in asEntitystring &in type)
{
  
SetEntityActive("afteroil"true);
)  
//Another. 

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 08-23-2014, 01:47 PM by Romulator.)
08-23-2014, 01:46 PM
Find
giacomo9 Offline
Junior Member

Posts: 37
Threads: 11
Joined: Nov 2012
Reputation: 0
#4
RE: Script Error

Thanks for help, everything works fine now.
08-23-2014, 02:03 PM
Find




Users browsing this thread: 1 Guest(s)