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
SOLVED [SCRIPT HELP] 2 scripts together Token Error!
heyitsrobert97 Offline
Member

Posts: 68
Threads: 29
Joined: Jan 2012
Reputation: 0
#1
SOLVED [SCRIPT HELP] 2 scripts together Token Error!

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.

This Darn House! , Four Doors, Youtube
(This post was last modified: 01-11-2012, 09:26 AM by heyitsrobert97.)
01-11-2012, 09:08 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: [SCRIPT HELP] 2 scripts together Token Error!

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)

01-11-2012, 09:18 AM
Find
heyitsrobert97 Offline
Member

Posts: 68
Threads: 29
Joined: Jan 2012
Reputation: 0
#3
RE: [SCRIPT HELP] 2 scripts together Token Error!

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.

This Darn House! , Four Doors, Youtube
01-11-2012, 09:26 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#4
RE: SOLVED [SCRIPT HELP] 2 scripts together Token Error!

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

01-11-2012, 09:28 AM
Find




Users browsing this thread: 1 Guest(s)