Home AMX User Forum NetLinx Studio

Help With Netlinx Error Messages

Greetings,

864: 09-16-2006 SAT 18:16:29 Interpreter CopyString (Reference) - Error 2 S=0x0000 D=0x0000
865: 09-16-2006 SAT 18:16:29 Interpreter GetString - Error 1 Tk=0x0000

AND:

858: 09-16-2006 SAT 18:16:35 Interpreter Ref Error ^CLED_SIGN_MESSAGES Index to large
859: 09-16-2006 SAT 18:16:35 Interpreter RunCode - Clear Buffer Error

Besides what is lierally obvious about the above messages, could anyone offer some more specific interpretion of them?

Thank you.

Comments

  • jjamesjjames Posts: 2,908
    I would first suggest compiling with debug information, this way, it will give you a line number as to where to look in code for this error.

    The first set of errors I believe I've seen when trying to parse something (MID_STRING, RIGHT_STRING or LEFT_STRING) out of an empty string. The second set I would suspect you're trying to use CLEAR_BUFFER on an index of something that doesn't exist.

    Without seeing any of the code, this is all an assumption.
  • Make sure you are initializing any array position var's ....?
  • viningvining Posts: 4,368
    Usually that mean what is says, your trying to add some to or copy something from and array that doesn't have the index your referencing.

    Let's say you have an array of five items and you try to add data to the sixth or copy something from the sixth, well there isn't a sixth so it comes up with this error. Sometimes with code using "for loops" this happens when it goes over the condition amount so where you place you code is important, it should be with in the loop otherwise it will be condition + 1 which is generally out side of the array index.

    The clear_buffer runcode error is interesting.
  • Greetings,

    864: 09-16-2006 SAT 18:16:29 Interpreter CopyString (Reference) - Error 2 S=0x0000 D=0x0000
    865: 09-16-2006 SAT 18:16:29 Interpreter GetString - Error 1 Tk=0x0000

    AND:

    858: 09-16-2006 SAT 18:16:35 Interpreter Ref Error ^CLED_SIGN_MESSAGES Index to large
    859: 09-16-2006 SAT 18:16:35 Interpreter RunCode - Clear Buffer Error

    If I interpret the initial numbers correctly the two quotes are out of sequence.

    If that is so, the CopyString error is probably caused by the ^CLED error so concentrate on that. No idea what it means though!
  • 858: 09-16-2006 SAT 18:16:35 Interpreter Ref Error ^CLED_SIGN_MESSAGES Index to large

    I agree about compiling with debug. The message would have given you a line number indicating the error. (Don't flame me about modules and includes line number etc...I know and I feel your pain, just out of my territory. Also I recognize it should be "too large". Compilers don't complain about spelling as long as you are consistently wrong.)

    The particular error means the array LED_SIGN_MESSAGES was accessed with an index larger than the MAX_SIZE of the array.

    Say LED_SIGN_MESSAGES is declared

    char LED_SIGN_MESSAGES[100];

    and at some line (which compiling with debug would tell you) an array element was referenced by a variable index (I'll say the index is called "index")

    result = LED_SIGN_MESSAGES[index];

    If index contained a value greater than the declared size of LED_SIGN_MESSAGES, or greater than 100 in my example, the error message is generated.

    I'm guessing the other errors are a result of the first error, and the master cannot cleanly handle those commands due to the initial error.
Sign In or Register to comment.