• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

"Invalid argument to date encode"? WTF? Needed for

alan_smithee

Corsair
Storm Modder
I'm writing a new quest so resolving this bug is vital for me.
My game CTD's trying to enter my boat out of the FdF port, and the error report says "Invalid argument to date encode." It blames the error on some lines in some dialogs I've edited.

Like, for three different lines in two of the dialogs, the report says,

"runtime error, no rAP data
Local CRC 10986218
Build CRC 7ad03b9a"

and etc. Seadogs.c is blamed too, but it's only the dialogs I've edited. I need to determine just which lines are causing the bug, and then figure out what in this lines is the problem. Just how are the lines counted -- e.g., spaces are not counted as lines, right, but how about //'d out lines? Is the very first line on the page 1 or 0? I've also run these dialogs through the dialogpatcher, if that makes a difference. And also, just what WOULD cause an "Invalid Argument to Date Encode", but leave the dialogs otherwise fully operational in their own right?

Thanks...
 
Turn off word wrapping and go to that line. All comments and whitespace are counted.
Note that every once in a while line counting gets messed up; for some reason the file Kieron's edited have this trouble (I don't know why and it's probably nothing to do with him...)
no rAP data means that you're accessing an attribute that hasn't been assigned a value yet (i.e. hasn't been initialized).
I.e. this code will generate the error:

object tmpobj;
if(tmpobj.attrib1 == "x") return;

because attrib1 doesn't exist yet.

Read the straight error.log, I find the output of the tool, while helpful if you want to check if it's a changed file, sometimes makes finding the error and line numer too complicated.
 
Yeah, sounds like something I'd cause by putting quest references in dialogs. I'm just feeling this all out blindly as I go along... do you have any suggestions just what sorts of quest ref probs to look for in dialogs?
 
Hmm, not really.
Just in general, when dealing with attributes, always do an if(CheckAttribute(reference_obj,"attribute_name")) and only _then_ actually do the attribute == whatever check.
But no rAP data errors aren't fatal...so it must be something else.

What's the code on the lines it says there are errors on?
 
Near as I can figure, the lines with code errors have absolutely nothing wrong with them...

When I'm done writing this quest (the bones of it anyway, to be fleshed out later), I'll need to send my dialogs and such to people for checking.
 
Back
Top