5 Replies Latest reply on Oct 19, 2006 12:49 PM by jpowerw

    Lingo Error

    jpowerw
      Hi:
      Please take a look at my code and tell me why I am getting this error!

      Thank you,

      jpowerw
        • 1. Re: Lingo Error
          duckets Level 1
          to get a particular item from a list, you need to use square brackets, like this:

          myList[itemNum]

          so in your code, perhaps it should be:

          gSourDataList[mReadLine]

          If this doesn't help, you can try debugging by using the 'put' statement to output the contents of your variables to the message window. Eg, you might want to add these lines to your 'writedata' handler

          put gSourDataList
          put mReadLine

          This will display the contents of those variables in the message window as the program runs.

          hope this helps!

          - Ben


          • 2. Lingo Error
            duckets Level 1
            Actually, I just noticed that your variable "mReadLine" isn't defined at all. That's going to be a problem. Maybe instead of:

            put gSourDataList(mReadLine) into theText

            you need:

            put gSourDataList[ i ] into theText

            (I had to add spaces around the 'i' to stop it from being interpreted as an 'italic' tag by this forum!)
            - Ben


            • 3. Re: Lingo Error
              Level 7
              What version of Director are you working with? I only vaguely remember
              that some Xtras used methods that started with "m".

              You have a HALT command at the end of your startMovie function. That's
              going to quit your movie, is that what you want to have happen?

              If all of these functions are written to the same movie script window,
              then you don't need to declare the global variables over and over again
              in each function. Declare them at the top of the window once, and then
              use them as you like in each function.

              Can you describe what it is that you want to accomplish with this code?
              Your function getFileNameList is only going to give you one item in
              gSourNameList, so it doesn't need to be a list. The function getFileName
              doesn't need a repeat loop because gSourNameList will only ever have one
              item in it. FileXtra4 can much more efficiently find a file with a
              specific extension for you.

              --
              Rob
              _______
              Rob Dillon
              Adobe Community Expert
              http://www.ddg-designs.com
              412-243-9119

              http://www.macromedia.com/software/trial/
              • 4. Re: Lingo Error
                jpowerw Level 1


                Thank's Ben, you have been a big help, and I feel a bit stupid!

                Wayne
                • 5. Re: Lingo Error
                  jpowerw Level 1


                  Thank's Rob: I'm using 5.0 (I know, very old).
                  I use the HALT command while authoring, to stop at a specific place.
                  Those other bugs you've noticed? I seen them just after posting my question.
                  I'm attemping to write a program that will store any number of text files into one large text file.
                  About the globals, do you mean to put all of the functions into the StartMovie handler?

                  Thanks,
                  Wayne