Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
hps file, fatal error could not load script file
Conrad285 Offline
Junior Member

Posts: 13
Threads: 4
Joined: Aug 2014
Reputation: 0
#1
hps file, fatal error could not load script file

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()
{

}
08-09-2014, 02:11 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: hps file, fatal error could not load script file

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

This semi colon should not be there.

08-09-2014, 02:45 AM
Find
Conrad285 Offline
Junior Member

Posts: 13
Threads: 4
Joined: Aug 2014
Reputation: 0
#3
RE: hps file, fatal error could not load script file

(08-09-2014, 02:45 AM)Mudbill Wrote:
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?
08-09-2014, 04:55 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: hps file, fatal error could not load script file

Oh yeah, the PlayerSoundAtEntity should be PlaySoundAtEntity.

08-09-2014, 09:10 AM
Find
burge4150 Offline
Member

Posts: 56
Threads: 15
Joined: Feb 2014
Reputation: 0
#5
RE: hps file, fatal error could not load script file

lol by any chance is this naked male going to fly at the player while playing the iron maiden sound? :-)
08-09-2014, 05:01 PM
Find
Conrad285 Offline
Junior Member

Posts: 13
Threads: 4
Joined: Aug 2014
Reputation: 0
#6
RE: hps file, fatal error could not load script file

(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
(This post was last modified: 08-09-2014, 06:39 PM by Conrad285.)
08-09-2014, 06:37 PM
Find
Conrad285 Offline
Junior Member

Posts: 13
Threads: 4
Joined: Aug 2014
Reputation: 0
#7
RE: hps file, fatal error could not load script file

(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.
08-09-2014, 08:58 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#8
RE: hps file, fatal error could not load script file

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.

(This post was last modified: 08-09-2014, 09:30 PM by Mudbill.)
08-09-2014, 09:30 PM
Find
Conrad285 Offline
Junior Member

Posts: 13
Threads: 4
Joined: Aug 2014
Reputation: 0
#9
RE: hps file, fatal error could not load script file

(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.


Attached Files
.png   frictionalforum.png (Size: 71.26 KB / Downloads: 90)
(This post was last modified: 08-11-2014, 03:18 AM by Conrad285.)
08-11-2014, 02:49 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#10
RE: hps file, fatal error could not load script file

PlaySoundAtEntity ("", "24_iron_maiden", "corpse_male_1", 0, false) <<<

Missing a semi colon now.

08-11-2014, 04:13 AM
Find




Users browsing this thread: 1 Guest(s)