There seems to be a few errors..
Remember that:
- EVERY void opens and closes with the respective braces.
- A void CANNOT be within a void.
This should fix it
void OnLeave()
{
}
void OnStart()
{
AddEntityCollideCallback("Player", "Teleport", "jumpscare", true, 1);
}
void jumpscare(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("jumpscare", true);
AddPropForce("jumpscare", 10000, 0, 0, "world");
PlaySoundAtEntity("", "24_iron_maiden.snt", "jumpscare", 0, false);
}
Edit: I have evidence of you that suggests that all you do copy and paste code. You should try to understand what you are coding, whether you're watching a YouTube video or not. While lengthy, try checking out some of Mudbill's tutorials on Amnesia CS development. While he won't cover teleporting naked guys, he does explain coding and how to perform some cool stuff.
And too, look at the FrictionalGames wiki. It's a nuisance to read, I know, but there is some very helpful stuff there.