Frictional Games Forum (read-only)

Full Version: hps file, fatal error could not load script file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
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()
{

}
Code:
void Collide_Area (string &in asParent, string &in asChild, int alState); <<<

This semi colon should not be there.
(08-09-2014, 02:45 AM)Mudbill Wrote: [ -> ]
Code:
void Collide_Area (string &in asParent, string &in asChild, int alState); <<<

This semi colon should not be there.

Thanks for the quick response! I tried removing the semi colon but received the same error message. Any other thoughts?
Oh yeah, the PlayerSoundAtEntity should be PlaySoundAtEntity.
lol by any chance is this naked male going to fly at the player while playing the iron maiden sound? :-)
(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
(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.
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.
(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.

Post the updated script.

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.

Post the updated script.
Code:
PlaySoundAtEntity ("", "24_iron_maiden", "corpse_male_1", 0, false) <<<

Missing a semi colon now.
Pages: 1 2