ObsidianLegion
Member
Posts: 173
Threads: 53
Joined: Jun 2011
Reputation:
0
|
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 |
|
Kyle
Posting Freak
Posts: 911
Threads: 36
Joined: Sep 2010
Reputation:
7
|
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 |
|
ObsidianLegion
Member
Posts: 173
Threads: 53
Joined: Jun 2011
Reputation:
0
|
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 |
|
Kyle
Posting Freak
Posts: 911
Threads: 36
Joined: Sep 2010
Reputation:
7
|
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)
AddEntityCollideCall back("Player", "Villagers", "CollideVillagers", true, 1);
AddEntityCollideCall back("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.
|
|
07-29-2011, 01:15 PM |
|
MrCookieh
Member
Posts: 157
Threads: 8
Joined: Jul 2011
Reputation:
0
|
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
|
|
07-29-2011, 01:55 PM |
|
xtron
Senior Member
Posts: 402
Threads: 37
Joined: May 2011
Reputation:
2
|
RE: Strange .hps error
use the notepad++ .HPS addon and you won't get errors like this very often.
Dubstep <3
|
|
07-29-2011, 04:45 PM |
|
ObsidianLegion
Member
Posts: 173
Threads: 53
Joined: Jun 2011
Reputation:
0
|
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 |
|
Kyle
Posting Freak
Posts: 911
Threads: 36
Joined: Sep 2010
Reputation:
7
|
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 |
|
|