PDA

View Full Version : Debug - Add Watch (Arrays) & Dump



rich_is_bored
05-18-2004, 02:24 PM
I'm writing an LScript to import a filetype.

So far the script parses a file and the data is loaded into a few multidimentional arrays.

I want to check the data stored in these arrays to make sure that it is correct and I can continue.

Here is a snippet of code to better explain the way I have structured my arrays...



currentLine = 1;
vertCount = 0;
vertFlags = 1;
vertX = 2;
vertY = 3;
vertZ = 4;
vertU = 5;
vertV = 6;
vertBoneIndex = 7;

... code ...

for (vertCount = 1; vertCount <= mesh[meshCount][meshNumVerts]; vertCount++) {
temp = data[currentLine];
tempArray = parse(" ",temp);
vert[meshCount][vertCount][vertFlags] = tempArray[1];
vert[meshCount][vertCount][vertX] = tempArray[2];
vert[meshCount][vertCount][vertY] = tempArray[3];
vert[meshCount][vertCount][vertZ] = tempArray[4];
vert[meshCount][vertCount][vertU] = tempArray[5];
vert[meshCount][vertCount][vertV] = tempArray[6];
vert[meshCount][vertCount][vertBoneIndex] = tempArray[7];
currentLine += 1;
}

So, I load up LW's debugger and attempt to add the array vert to the watch list.

I type "main" in the UDP field and "vert" in the Variable field. "vert" shows up in the watch window.

Apparently LW has no idea what I'm refering to. I can step line by line through assignments to the array vert and see no change to the watch window.

I tried typing "vert[]" into the Variable field instead and I get the error message "Identifier vert[] is invalid."

How am I supposed to tell debugger to display an array? Am I missing something? The manual doesn't go into detail on this.

There is also a command called dump() that dumps all the internal variables to a text file which would work just as well but when using it per the manual like so...


dump(“c:\myscript.var”);

... I get nothing. I'm guessing this command made the documentation but not the command interpreter?

I'm sure I'm not the first to encounter this problem even though this section of the forum seems pretty thin. Any direction would be appriciated.