I have an unknown problem.
lordpalandus
08 Sept 2017, 07:47Hi,
I don't know what to do, as the below error message is very nondescriptive:
Error running script: Object reference not set to an instance of an object.
What does this mean? Generally, the error messages tells me what object or variable is problematic, but I have no idea what I could have done that could create such an error. Anyone happen to know what it is?
(if I figure out what it is on my own I'll update this post)
lordpalandus
08 Sept 2017, 07:51(grumble)
I figured out what it was.
In one of my new scripts, I had a typo. I wrote " player.DepthLevel1 " (ignoring the quotes), when I meant to type " player.DepthLevel = 1 ".
(facepalm)
hegemonkhan
08 Sept 2017, 08:47unfortunately, that's the worse error message, as it's the last/generalized/default/'else' error message: something is wrong with your code, but it can be anything causing the error, good luck trying to find it... as this error message is the least helpful of all, lol.
When you see this error message... you just got to scour your code, until you can find the mistake, and ask others to help too, as they can notice code errors that you may not.

DarkLizerd
08 Sept 2017, 16:07What would help the most, is when Quest find an error, it should print the line that confused it...
At least that way, you are near the problem... hopefully...
hegemonkhan
08 Sept 2017, 21:46that's not always possible for it to do, unfortunately

K.V.
08 Sept 2017, 22:11It usually gets me when I add something in Code View and forget to make the text <![CDATA[Hello.<br>This line break will throw that error if you don't make it CDATA!!!]]>
.
jmnevil54
09 Sept 2017, 01:19That last time I had an error like that, I either had a lone "}" left in a vital function, or I messed up the name of an attribute. Either one...
The Pixie
09 Sept 2017, 07:33When you get an error like that, first think about what should be happening, so you can work out suspect scripts. If if happens when you type a command, look at that command and any functions it uses, for example. If it happens every turn, look at turn scripts.
Then add print commands atvarious points in your code, and play the game again. See which print commands it gets to before it hits the error. May also be useful to have the print commands print the value of a variable or attribute to see if it is what you think it should be.