Frictional Games Forum (read-only)

Full Version: script fail
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, i got a help with a script, but when i tries to load my custom it just ends up with an error,

Here is the script

void MakePrisonerDisapear_1(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
PlaySoundAtEntity("", "leather_walk.snt", "prisoner", 0.0f, false);
PlaySoundAtEntity("", "react_scare.snt", "Player", 0.0f, false);
StartPlayerLookAt("LookAtPrisoner", 5.0f, 5.0f, "");
Addtimer("", 1.0f, "MakePrisonerDisappear_2");
}
void MakePrisonerDisappear_2(string &in asTimer);
{
GiveSanityDamage(5, true);
SetEntityActive("prisoner", false);
SetPlayerActive(true);

Do you see anything wrong with it?
Plz reply with a fix it would be awesome! Big Grin
(06-05-2011, 12:58 PM)klacke Wrote: [ -> ]void MakePrisonerDisappear_2(string &in asTimer);
You shouldn't have a semi-colon at the end of that line.
Is this your complete script? If not, here is the modified version:

Code:
void MakePrisonerDisapear_1(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
PlaySoundAtEntity("", "leather_walk.snt", "prisoner", 0.0f, false);
PlaySoundAtEntity("", "react_scare.snt", "Player", 0.0f, false);
StartPlayerLookAt("LookAtPrisoner", 5.0f, 5.0f, "");
AddTimer("", 1.0f, "MakePrisonerDisappear_2");
}
void MakePrisonerDisappear_2(string &in asTimer)
{
GiveSanityDamage(5, true);
SetEntityActive("prisoner", false);
SetPlayerActive(true);
}
(06-05-2011, 01:16 PM)Kyle Wrote: [ -> ]Is this your complete script? If not, here is the modified version:

Code:
void MakePrisonerDisapear_1(string &in asParent, string &in asChild, int alState)
{
SetPlayerActive(false);
PlaySoundAtEntity("", "leather_walk.snt", "prisoner", 0.0f, false);
PlaySoundAtEntity("", "react_scare.snt", "Player", 0.0f, false);
StartPlayerLookAt("LookAtPrisoner", 5.0f, 5.0f, "");
AddTimer("", 1.0f, "MakePrisonerDisappear_2");
}
void MakePrisonerDisappear_2(string &in asTimer)
{
GiveSanityDamage(5, true);
SetEntityActive("prisoner", false);
SetPlayerActive(true);
}

Saw now that i forgot 1 line

AddEntityCollideCallback("Player", "DisapearGuy1", "MakePrisonerDisappear_1", true, 1);

cuz when i copied yours i still got that error message...
Dude, I had fixed that allready before u posted this thread Big Grin