![]() |
hps file, fatal error could not load script 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: hps file, fatal error could not load script file (/thread-25829.html) Pages:
1
2
|
hps file, fatal error could not load script file - Conrad285 - 08-09-2014 This is my script for my .hps file, my error is 11,1: void OnStart() { AddEntityCollideCallback("Player", "TeleportScript", "Collide_Area", true, 1); } void Collide_Area (string &in asParent, string &in asChild, int alState); { SetEntityActive("corpse_male_1", true); AddPropForce("corpse_male_1", -10000, 0, 0, "world"); PlayerSoundAtEntity ("", "24_iron_maiden", "corpse_male_1", 0, false); } void OnEnter() { } void OnLeave() { } RE: hps file, fatal error could not load script file - Mudbill - 08-09-2014 Code: void Collide_Area (string &in asParent, string &in asChild, int alState); <<< This semi colon should not be there. RE: hps file, fatal error could not load script file - Conrad285 - 08-09-2014 (08-09-2014, 02:45 AM)Mudbill Wrote: Thanks for the quick response! I tried removing the semi colon but received the same error message. Any other thoughts? RE: hps file, fatal error could not load script file - Mudbill - 08-09-2014 Oh yeah, the PlayerSoundAtEntity should be PlaySoundAtEntity. RE: hps file, fatal error could not load script file - burge4150 - 08-09-2014 lol by any chance is this naked male going to fly at the player while playing the iron maiden sound? :-) RE: hps file, fatal error could not load script file - Conrad285 - 08-09-2014 (08-09-2014, 09:10 AM)Mudbill Wrote: Oh yeah, the PlayerSoundAtEntity should be PlaySoundAtEntity. Thank you so much, I'll try that as soon as I'm back at my desktop! (08-09-2014, 05:01 PM)burge4150 Wrote: lol by any chance is this naked male going to fly at the player while playing the iron maiden sound? :-) You caught me! :-P just started making my own story a couple months ago and am now putting all the scares and ambiance throughout my maps. I know it's cheap but oh well :-P RE: hps file, fatal error could not load script file - Conrad285 - 08-09-2014 (08-09-2014, 09:10 AM)Mudbill Wrote: Oh yeah, the PlayerSoundAtEntity should be PlaySoundAtEntity. I changed that now, but its now telling me that the fatal error is located at 12,1 which is just a "}". I'm now very lost and don't know if I should just abandon the script or what. RE: hps file, fatal error could not load script file - Mudbill - 08-09-2014 Well, then you've done more changes because I tested the script myself and it loaded fine after these two changes. Post the updated script. RE: hps file, fatal error could not load script file - Conrad285 - 08-11-2014 (08-09-2014, 09:30 PM)Mudbill Wrote: Well, then you've done more changes because I tested the script myself and it loaded fine after these two changes. Sorry, don't know what i added to mess it up, I don't remember adding an extra line. Here's the updated script: void OnStart() { AddEntityCollideCallback("Player", "ScriptArea_1", "Collide_Area", true, 1); } void Collide_Area (string &in asParent, string &in asChild, int alState) { SetEntityActive("corpse_male_1", true); AddPropForce("corpse_male_1", -10000, 0, 0, "world"); PlaySoundAtEntity ("", "24_iron_maiden", "corpse_male_1", 0, false) } void OnEnter() { } void OnLeave() { } (08-09-2014, 09:30 PM)Mudbill Wrote: Well, then you've done more changes because I tested the script myself and it loaded fine after these two changes. RE: hps file, fatal error could not load script file - Mudbill - 08-11-2014 Code: PlaySoundAtEntity ("", "24_iron_maiden", "corpse_male_1", 0, false) <<< Missing a semi colon now. |