I have an unknown problem.

Hi,

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)


(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)


unfortunately, 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.


What 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...


that's not always possible for it to do, unfortunately


It 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!!!]]>.


That 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...


When 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.


Log in to post a reply.

Support

Forums