![]() |
Script Crashes The Game - 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: Script Crashes The Game (/thread-24808.html) Pages:
1
2
|
Script Crashes The Game - Wapez - 03-11-2014 Hello Forum Members! So recently I created a script for our mod, In Lucy's Eyes. After finishing it, I tried it and got an error message. I fixed some simple mistakes in the script, and then I tried it again. I got into the map, and everything worked normally. Until my script was activated. The game first froze completely, and after a while I managed to tab it down. I saw a BlackBox message saying "Please wait, gathering system information" or something, as well as being stuck on 2% in the loading bar. This same thing happened repeatedly every time I tried the map. What the script does: It's a simple "movement puzzle". Six pipes are placed in a corridor, and each one of them release steam into the corridor every few seconds. (For this I have one area inside every pipe, which I spawn particle systems and sounds at, and one larger area in front of every pipe that I check whether the player is colliding with or not during the time the steam is being released) Your goal is to get past it. The steam will deal damage to you as you get hit. I wanted to randomize and tweak stuff in a specific way, so I made the script a lot more complicated than it had to be. For anyone who hasn't created it I bet it's hard to read, but just let me know if I can help you understand something. My question is: Why does the game crash only when the script is activated, and why does it not provide me with an error message? What is causing the crash? After seeing the HPL log, I noticed the 18_steam_release.ogg sound was causing some problems. I disabled that sound in the script, but it still crashes. Any help here is much appreciated. As I mentioned, there is no problem loading the map. The actual script: Spoiler below!
HPL log after disabling the sound: Spoiler below!
RE: Script Crashes The Game - PutraenusAlivius - 03-11-2014 I think that the fp_metal scraping snt cannot be found. You should maybe make it again. And Ceiling texture 2 diff doesn't have a POW2 size (512x512, 1024x1024). Floor 03 too. RE: Script Crashes The Game - Wapez - 03-11-2014 Those things are common minor issues in all my maps, but have no impact on gameplay. Does not affect the script or the loading. RE: Script Crashes The Game - PutraenusAlivius - 03-11-2014 What about the particle? Maybe it's a problem with the ps system itself. RE: Script Crashes The Game - Wapez - 03-11-2014 The first PS plays before it crashes. I highly doubt that's the problem. RE: Script Crashes The Game - Mudbill - 03-11-2014 (03-11-2014, 01:54 PM)Wapez Wrote: ERROR: Couldn't create script '/main/global.hps' This tells me there's another issue in your global.hps script. Since you used local variables for the script you posted as well as OnStart/OnEnter etc, that must mean it's from a map's .hps file. Perhaps post your global.hps? RE: Script Crashes The Game - Daemian - 03-11-2014 Take a look at line #6 below PHP Code: 1 void RunSteamFlow(int alEventCount){ Shouldn't that be SteamEvent( RunCount ) ? Cause right now, as you know, that could cause an infinite loop and crash the game. RE: Script Crashes The Game - Wapez - 03-11-2014 (03-11-2014, 03:15 PM)Amn Wrote: Take a look at line #6 below No. That if-statement is only true if iSteamArea becomes the same number as it's been before, to prevent the SteamEvent function to apply to the same area several times during one SteamRun function. It simply generates a new value for the iSteamArea integer until it gets one that hasn't been used already. I guess it ultimately could become an infinite loop, but it should eventually hit every number. Is this a real problem though? (03-11-2014, 03:12 PM)Mudbill Wrote:(03-11-2014, 01:54 PM)Wapez Wrote: ERROR: Couldn't create script '/main/global.hps' I don't have a global.hps yet, as one is not needed for the scripts I've been working on. It won't help this script either. RE: Script Crashes The Game - Mudbill - 03-11-2014 Hmm, well in that case. I haven't looked THAT much into the script itself if the error lies there, but perhaps you should try thinning out some of the warnings? Just brush up on some of the non-pow2 textures, add the <RESOURCES> tag in your lang, create an empty global.hps file, and investigate why that sound file is bugging you? If all those warnings and errors were to be cleaned up, we'd know that they are not causing any issues. RE: Script Crashes The Game - Daemian - 03-12-2014 Well, you can check the Amnesia app in Task Manager when this freeze happens. If CPU and Mem usage go up, there's a loop of doom in your code. And when it hits the limit, it crashes for sure. I tested a smaller version of your code, and that's what happens, but I didn't get the crash cause I stopped it, I was afraid it could reboot my pc. PHP Code: void a () |