Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SOLVED [SCRIPT HELP] 2 scripts together Token Error!
Author Message
heyitsrobert97 Offline
Member

Posts: 68
Joined: Jan 2012
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,320
Joined: Apr 2011
Reputation: 57
Post: #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 all posts by this user Quote this message in a reply
heyitsrobert97 Offline
Member

Posts: 68
Joined: Jan 2012
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,320
Joined: Apr 2011
Reputation: 57
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)