Frictional Games Forum (read-only)

Full Version: SOLVED [SCRIPT HELP] 2 scripts together Token Error!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey I Need Help I joined 2 scripts into Level_01.hps file but if says that (10,1) Unexpected Token and at (15,1) the same WTF? and if someone can fix it can you tell me how to continue with more than 2 scripts thankuShy


void OnStart()

{
AddEntityCollideCallback("Player", "musicareabasement", "MusicPlay", true, 1);
AddEntityCollideCallback("Player", "basementdoorsmash", "func_slam", true, 1);

}

void MusicPlay(string &in asParent, string &in asChild, int alState);
{
PlayMusic("Music_01.ogg" , true , 10 , 2.0f , 0 , true);
}

void func_slam(string &in asParent, string &in asChild, int alState);
{
SetPropHealth("basementdoor", 0.0f);
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare", "Player", 0, false);
}
/////////////////////////////

First Script is a sound area box script. It worked alone
The Second Script is a door explode script when you enter the area box this worked alone too.
You have ; on the end of both syntax's. Delete those and it should work.

From this:
Quote:void func_slam(string &in asParent, string &in asChild, int alState);

To this:
Quote:void func_slam(string &in asParent, string &in asChild, int alState)
Thank you so muchBig Grin

lol i probably sound like some stupid noob but i have never done proper scripting before. only some when creating a soundboard a couple of years back.
No problem, you can go to sites like these:

http://wiki.frictionalgames.com/hpl2/amn...ons#player


http://wiki.frictionalgames.com/hpl2/tut...t_beginner


To help you when you are starting. : D