Frictional Games Forum (read-only)
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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: FATAL ERROR: Could not load script file! (/thread-56556.html)



FATAL ERROR: Could not load script file! - DarkMattNoir - 10-31-2019

Hello ! I have already seen a forum on this topic, but I have not had any answers. As soon as I try to run my custom story on Amnesia, a message appears :

FATAL ERROR: Could not load script file "custom_stories/The                             
Room//maps/Part 1.hps"!
 main (46,12) : ERR : Expected "("

I send you the script of my ".hps" file :

void OnStart()


{

SetPlayerCrouching(true);
SetPlayerActive(false);
FadeOut(0);
FadeIn(3);
AddEntityCollideCallback("Player", "Screamer_1", "Screamer", true, 1);
AddTimer("", 3, "Intro");
AddEntityCollideCallback("1", "Disparition", "MonstreDisparu", true, 1);
AddEntityCollideCallback("Poignée", "Attache", "Attaché", true, 1);

}

void Screamer(string & in asParent, string & in asChild, int alState)

{

SetEntityActive("1", true);
SetSwingDoorDisableAutoClose("Armoire", true);
AddPropForce("Armoire", 3000, 0, 0,"world");
AddPropImpulse("1", 2000, 0, 0, "world");
PlaySoundAtEntity("", "24_iron_maiden.snt", "Screamer_1", 0, false);

}

void Intro(string &in asTimer)

{

SetPlayerCrouching(false);
SetPlayerActive(true);
PlaySoundAtEntity("", "react_sigh.snt", "Player", 0, false);

}

void MonstreDisparu(string & in asParent, string & in asChild, int alState)

{

SetEntityActive("1", false);

}

void Attaché(string & in asParent, string & in asChild, int alState)

{

SetEntityActive("Poignée", false);
SetEntityActive("Mount", false);
SetEntityActive("Lever", true);
PlaySoundAtEntity("", "level_wood_min_max01.snt", "Player", 0, false);

}

However, I read again, but I did not find the solution to the problem. I hope you can help me. I thank you in advance, goodbye Smile !


RE: FATAL ERROR: Could not load script file! - Mudbill - 10-31-2019

At a glance, the issue is likely "void Attaché" because you can't use special characters, like the accented E here, in coding syntax. Use a normal E.
Same thing with "Poignée".

This is why most programmers use English words in the code because other languages aren't as widely supported.


RE: FATAL ERROR: Could not load script file! - DarkMattNoir - 11-03-2019

Thank you very much ! In fact I am French and I did not know that we should not use special characters.