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-53769.html) |
FATAL ERROR: Could not load script file - WalkingTerror - 06-11-2017 I had all done and set up and then this error showed up what am i doing wrong ? And the .HPS and .Map file is in the maps folder and have both exact same names This is my Code: void OnStart() { AddUseItemCallback("", Key, Door, "UseKeyOnDoor", true); } void UseKeyOnDoor(string &in asItem, string &in asEntity) { SetSwingDoorLocked("Door", false, true); } void OnEnter() { SetPlayerLampOil(100); PreloadSound("amb_idle.snt"); } void OnLeave() { } RE: FATAL ERROR: Could not load script file - Romulator - 06-12-2017 The error code tells you your issue and apparently they are on your third line. Key and Door are not declared. Look at your script's 3rd line: the AddUseItemCallback. The script telling you that they are not declared means that the script thinks you're referencing something else in the .hps file. Really, all that you have done is forget to put them in quotation marks ( "" ) because they are string references. Provided you have an entity named "Key" and "Door" in your Level Editor, this should work. PHP Code: AddUseItemCallback("", "Key", "Door", "UseKeyOnDoor", true); RE: FATAL ERROR: Could not load script file - WalkingTerror - 06-14-2017 (06-12-2017, 09:32 AM)Romulator Wrote: The error code tells you your issue and apparently they are on your third line. Key and Door are not declared. Thank you it works! RE: FATAL ERROR: Could not load script file - Romulator - 06-15-2017 No problem! Good luck on your project If you have any more questions, feel free to post them here |