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
Intro to mod
Abion47 Offline
Senior Member

Posts: 369
Threads: 22
Joined: Oct 2015
Reputation: 46
#11
RE: Intro to mod

There are certain errors that, instead of providing compilation info, will just cause the game to crash without explanation. These kinds of errors can be a real pain to find, but one kind that I know of is if you have a pointer-type variable (basically any type that requires the "@" symbol to declare) on the class or global level.

Really the only way to find this error is to comment out everything that you've changed or added since before the error started, then reintroduce the code line by line until you reach the part that causes the crash.
05-26-2016, 04:33 AM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#12
RE: Intro to mod

Wait, why is it trying to load a .hps instead of a .hpm?
Did you try erasing temporarily the script file?

(This post was last modified: 05-26-2016, 06:44 AM by Daemian.)
05-26-2016, 06:43 AM
Find
Abion47 Offline
Senior Member

Posts: 369
Threads: 22
Joined: Oct 2015
Reputation: 46
#13
RE: Intro to mod

(05-26-2016, 06:43 AM)Daemian Wrote: Wait, why is it trying to load a .hps instead of a .hpm?
Did you try erasing temporarily the script file?

This is a good catch. If the dialog is saying that it cannot load "the_experiment.hps", then you are telling the debug to open a script file instead of the map file (an ".hpm" file), which would naturally cause it to crash.
(This post was last modified: 05-26-2016, 10:02 PM by Abion47.)
05-26-2016, 08:08 AM
Find
Hypercube Offline
Member

Posts: 124
Threads: 20
Joined: Sep 2015
Reputation: 1
#14
RE: Intro to mod

(05-26-2016, 08:08 AM)Abion47 Wrote:
(05-26-2016, 06:43 AM)Daemian Wrote: Wait, why is it trying to load a .hps instead of a .hpm?
Did you try erasing temporarily the script file?

This is a good catch. If the dialog is saying that it cannot load "the_experiment.hps", then you are telling the debug to open a script file instead of the map file (an ".hpm" file), which would naturally cause it to crash.
If your using debug, it won't allow you to select the hps file, it will only show the hpm files. And as I stated in my las comment, I corrected myself in saying "sorry, it says could not load hps file, not could not load hpm file". And besides, even if I could select the hps file, when it says "could not load file 'the_experiment.hps", it means it just can't load the script, that's all I meant.

I have tried holding control z until everything new I put in the script was gone, saved the file, but it still would'nt load. So I added the new script back, and that's why I thought it might be a problem with the editor, but it specifically could not load the script file, so I'm just confused why that is. I'll just go over it again, and see if I missed anything...
(This post was last modified: 05-27-2016, 12:35 AM by Hypercube.)
05-27-2016, 12:34 AM
Find
Hypercube Offline
Member

Posts: 124
Threads: 20
Joined: Sep 2015
Reputation: 1
#15
RE: Intro to mod

So I took out my entire script file, generated a new one, loaded up my map in debug, put the new script file back in and saved it, but the script recompile box or whatever popped up but didn't say anything, and I have no idea how any of the things that I put in the script have some sort of error. It worked fine before, until I put new things in the editor and script. What I put in the script should've been something that if it had an error, it would say so. But it doesn't. I don't recall ever adding anything more complex than what I added before.
05-30-2016, 10:30 PM
Find
Abion47 Offline
Senior Member

Posts: 369
Threads: 22
Joined: Oct 2015
Reputation: 46
#16
RE: Intro to mod

Does the map load with a default script file?
05-31-2016, 12:23 AM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#17
RE: Intro to mod

Bring the script (and the map) if you want.

05-31-2016, 02:32 AM
Find
Hypercube Offline
Member

Posts: 124
Threads: 20
Joined: Sep 2015
Reputation: 1
#18
RE: Intro to mod

Here's the script file:
http://www.mediafire.com/download/p0710z...riment.hps
06-06-2016, 12:32 AM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#19
RE: Intro to mod

I did some tests and I found there is a problem with that helper_message.hps, it keeps crashing the game. Anyways, if you remove the line setMessage and the include you're fine.

line 25 and line 319
PHP Code: (Select All)
#include "helpers/helper_message.hps"
SetMessage("What the hell was that?!",3.0f); 

06-06-2016, 10:27 PM
Find
Abion47 Offline
Senior Member

Posts: 369
Threads: 22
Joined: Oct 2015
Reputation: 46
#20
RE: Intro to mod

(06-06-2016, 10:27 PM)Daemian Wrote: I did some tests and I found there is a problem with that helper_message.hps, it keeps crashing the game. Anyways, if you remove the line setMessage and the include you're fine.

line 25 and line 319
PHP Code: (Select All)
#include "helpers/helper_message.hps"
SetMessage("What the hell was that?!",3.0f); 

Do you have the MessageMod installed and configured correctly? The script runs fine for me as is.
06-06-2016, 11:01 PM
Find




Users browsing this thread: 1 Guest(s)