![]() |
[SCRIPT] Error with .hps file - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: [SCRIPT] Error with .hps file (/thread-28901.html) |
Error with .hps file - MaksoPL - 01-02-2015 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); } RE: Error with .hps file - Daemian - 01-02-2015 Quotation marks. PHP Code: PlaySoundAtEntity("",unlock_door",door1",0,false); It should be like this: PHP Code: PlaySoundAtEntity("","unlock_door","door1",0,false); RE: Error with .hps file - MaksoPL - 01-02-2015 (01-02-2015, 01:52 PM)Daemian Wrote: Quotation marks. 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"); } RE: Error with .hps file - PutraenusAlivius - 01-03-2015 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 RE: Error with .hps file - Romulator - 01-03-2015 Your Message1, Message2 and Measage3 routines have the asParent and asChild flipped. Instead of: PHP Code: void Message1(string &in asChild, string &in asParent, int alState) It should be: PHP Code: void Message1(string &in asParent, string &in asChild, int alState) The same applies to Message2 and Message3 as well. RE: Error with .hps file - Daemian - 01-03-2015 But Romu those are just names. It shouldn't matter. Maybe he's just looking at the wrong hps. |