MaksoPL
Member
Posts: 51
Threads: 26
Joined: Mar 2014
Reputation:
0
|
Error with .hps file
Hi. When I try to test custom story level, i've get that error:
main (25,2) Unexpected end of the file
This is my .hps file:
void OnStart()
{
AddEntityCollideCallback("Player", "antonydead", "Message1", true, 1);
AddEntityCollideCallback("Player", "rozdzial1", "Message2", true, 1);
AddEntityCollideCallback("Player", "trup1", "Message3", true, 1);
AddUseItemCallback("","key1","door1","Door,true);
}
void Message1(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "AntonyDead", 10);
}
void Message2(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "Rozdzial1", 10);
}
void Message3(string &in asChild, string &in asParent, int alState)
{
SetMessage("Messages", "Trup1", 10);
}
void Door(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door1",false,true);
PlaySoundAtEntity("",unlock_door",door1",0,false);
}
|
|
01-02-2015, 01:44 PM |
|
Daemian
Posting Freak
Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation:
49
|
RE: Error with .hps file
Quotation marks.
PlaySoundAtEntity("",unlock_door",door1",0,false);
It should be like this:
PlaySoundAtEntity("","unlock_door","door1",0,false);
|
|
01-02-2015, 01:52 PM |
|
MaksoPL
Member
Posts: 51
Threads: 26
Joined: Mar 2014
Reputation:
0
|
RE: Error with .hps file
(01-02-2015, 01:52 PM)Daemian Wrote: Quotation marks.
PlaySoundAtEntity("",unlock_door",door1",0,false);
It should be like this:
PlaySoundAtEntity("","unlock_door","door1",0,false);
Nope. That same error.
I've try everythink, what i can. Nothing happens. That same error.
That happen when i've add that lines:
void Door(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door1",false,true);
PlaySoundAtEntity("","unlock_door","door1",0,false);
RemoveItem("key1");
}
(This post was last modified: 01-02-2015, 02:27 PM by MaksoPL.)
|
|
01-02-2015, 01:54 PM |
|
PutraenusAlivius
Posting Freak
Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation:
119
|
RE: Error with .hps file
void Door(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("door1",false,true);
PlaySoundAtEntity("","unlock_door","door1",0,false);
RemoveItem("key1");
}
Hmm. Why wouldn't this work? This should work! I think that there's another error, but not here. Can you please give us your entire FULL hps file?
EDIT: Emphasizing the FULL
"Veni, vidi, vici."
"I came, I saw, I conquered."
|
|
01-03-2015, 05:14 AM |
|
Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
|
RE: Error with .hps file
Your Message1, Message2 and Measage3 routines have the asParent and asChild flipped.
Instead of:
void Message1(string &in asChild, string &in asParent, int alState)
It should be:
void Message1(string &in asParent, string &in asChild, int alState)
The same applies to Message2 and Message3 as well.
Discord: Romulator#0001
|
|
01-03-2015, 05:33 AM |
|
Daemian
Posting Freak
Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation:
49
|
RE: Error with .hps file
But Romu those are just names. It shouldn't matter.
Maybe he's just looking at the wrong hps.
(This post was last modified: 01-03-2015, 07:41 AM by Daemian.)
|
|
01-03-2015, 07:40 AM |
|
|