//Error code
void OnStart()
}
AddEntityCollideCallback("Player","TeleportScript",
string& asChildName, "NailThatSucker", true, 1);
{
void NailThatSucker
:(string& asParent, string &in asChild, int alStates)
;
{
-snip-
}
You didn't declare this, instead, you made a new section to the string. Look at the curly braces, { opens and } closes, you have it the other way around in your void OnStart() area. Also, in your function you added a colon ( : ) where it doesn't belong, and a semi-colon doesn't go at the end of a function.
//Good code
void OnStart()
{
AddEntityCollideCallback("Player", "TeleportScript", "NailThatSucker", true, 1);
}
void NailThatSucker(string& asParent, string &in asChild, int alStates)
{
SetEntityActive("TeleportedNakedGuy", true);
AddPropForce("TeleportedNakedGuy", -10000, 0, 0, "world");
PlaySoundAtEntity("", "24_iron_maiden.snt", "TeleportedNakedGuy", 0, false);
}