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
Strange .hps error
ObsidianLegion Offline
Member

Posts: 173
Threads: 53
Joined: Jun 2011
Reputation: 0
#1
Strange .hps error

Each time I boot up a map it come up with the following

34, 1: EXPECTED (
40, 1: EXPECTED (
59, 1: EXPECTED (

In this .hps

////////////////////////
//Run when starting map
void OnStart()
{
AddEntityCollideCallBack("Player", "Villagers", "CollideVillagers", true, 1);
AddEntityCollideCallBack("Player", "Thoughts", "CollideThoughts", true, 1);
SetEntityPlayerInteractCallback("NoteIntro1", "ReminderTrigger", true);
AddUseItemCallback("", "BackDoorKey", "BackDoor", "UsedKeyOnDoor", true);
}

////////////////////////
//Run when entering map
void OnEnter()
{
}

//////////////////////
//Run when leaving map
void OnLeave()
{
SetupLoadScreen("LoadingText", "Basement", 1, "");
}

///////////////////////
//CallBacks
void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("BackDoor", false, true);
}

////////////////////////
//Triggers
void ReminderTrigger
{
    SetMessage("Intro", "Reminder", 0);
    StartPlayerLookAt("BackDoor", 1.0f, 1.0f, "");
    AddTimer("BackDoor", 2.0f, "Backdoor");
}
void BackDoor
{
StopPlayerLookAt();
}

////////////////////////////
//Collision Areas
void CollideThoughts(string &in asParent, string &in asChild, int alState)
{
    SetMessage("Intro", "Thoughts", 0);
}

void CollideVillagers(string &in asParent, string &in asChild, int alState)
{
    PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
    GiveSanityDamage(20, true);
    StartPlayerLookAt("Entrance", 1.0f, 1.0f, "");
    AddTimer("Entrance", 2.0f, "Entrance");
}
void Entrance
{
StopPlayerLookAt();
}

"Good men mean well; they just don't always end up doing well." -Isaac Clarke, Dead Space 2, Chapter 12
07-29-2011, 11:48 AM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#2
RE: Strange .hps error

void ReminderTrigger(string &in asEntity)

void Backdoor(string &in asTimer)

void Entrance(string &in asTimer)

You need to remember that each function has a pair parentheses with parameters from which have to be called inbetween them.

(This post was last modified: 07-29-2011, 12:13 PM by Kyle.)
07-29-2011, 12:13 PM
Find
ObsidianLegion Offline
Member

Posts: 173
Threads: 53
Joined: Jun 2011
Reputation: 0
#3
RE: Strange .hps error

(07-29-2011, 12:13 PM)Kyle Wrote: void ReminderTrigger(string &in asEntity)

void Backdoor(string &in asTimer)

void Entrance(string &in asTimer)

You need to remember that each function has a pair parentheses with parameters from which have to be called inbetween them.

Now it's coming up with this error
No matching signatures to:
5, 1: AddEntityCollideCallBack(string@&, string@&, string@&, const bool, const uint)
6, 1:AddEntityCollideCallBack(string@&, string@&, string@&, const bool, const uint)

"Good men mean well; they just don't always end up doing well." -Isaac Clarke, Dead Space 2, Chapter 12
07-29-2011, 01:07 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#4
RE: Strange .hps error

(07-29-2011, 01:07 PM)Lolnesia09 Wrote:
(07-29-2011, 12:13 PM)Kyle Wrote: void ReminderTrigger(string &in asEntity)

void Backdoor(string &in asTimer)

void Entrance(string &in asTimer)

You need to remember that each function has a pair parentheses with parameters from which have to be called inbetween them.

Now it's coming up with this error
No matching signatures to:
5, 1: AddEntityCollideCallBack(string@&, string@&, string@&, const bool, const uint)
6, 1:AddEntityCollideCallBack(string@&, string@&, string@&, const bool, const uint)

AddEntityCollideCallback("Player", "Villagers", "CollideVillagers", true, 1);


AddEntityCollideCallback("Player", "Thoughts", "CollideThoughts", true, 1);

I thought it didn't matter if you capitalized the "b" in AddEntityCollideCallback, but I guess whoever said it was wrong.

If it doesn't work, then I'm wrong. Tongue

07-29-2011, 01:15 PM
Find
MrCookieh Offline
Member

Posts: 157
Threads: 8
Joined: Jul 2011
Reputation: 0
#5
RE: Strange .hps error

The script is very sensitive. One error, be it an A instead of an a, can mess the whole thing up.
That's why you have to go through your code twice Smile

The Well: Descent - Take a look at it!
07-29-2011, 01:55 PM
Find
xtron Offline
Senior Member

Posts: 402
Threads: 37
Joined: May 2011
Reputation: 2
#6
RE: Strange .hps error

use the notepad++ .HPS addon and you won't get errors like this very often.

[Image: 44917299.jpg]Dubstep <3
07-29-2011, 04:45 PM
Find
ObsidianLegion Offline
Member

Posts: 173
Threads: 53
Joined: Jun 2011
Reputation: 0
#7
RE: Strange .hps error

(07-29-2011, 04:45 PM)xtron Wrote: use the notepad++ .HPS addon and you won't get errors like this very often.

I did >.< Notepad ++ AND before I editied it, changed it to a .hps

"Good men mean well; they just don't always end up doing well." -Isaac Clarke, Dead Space 2, Chapter 12
07-29-2011, 07:37 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#8
RE: Strange .hps error

(07-29-2011, 07:37 PM)Lolnesia09 Wrote:
(07-29-2011, 04:45 PM)xtron Wrote: use the notepad++ .HPS addon and you won't get errors like this very often.

I did >.< Notepad ++ AND before I editied it, changed it to a .hps

Then you should have been able to detect which lines were messed up, and what was wrong with them. That's why we have a script funtions page which tells you right there what the callback looks like and how to use functions that are added in your .hps file.

07-29-2011, 07:48 PM
Find




Users browsing this thread: 1 Guest(s)