>Build an exe file with debug info checked in Project Manager.
>Run it in stand-alone mode and look for message(1) value
>set by error.
>
>What does the line returned by message(1) mean ? It seems that
>it returns some random line from program !?
>I cannot see any reason why it is a line from totally different
>part of program!
>
Did you include the debugging information when you compiled?
>Why chr(13) is added to the end of message(1) ?