Help...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Protocol
    Indigo Rose Customer
    • Oct 2002
    • 423

    Help...

    I'm simply trying to read a text file to a table. I've written the code out...it all looks good. Then I go to build it and it thinks I need to add more "=" signs.

    The line of code is (ProgramFiles is declared/referenced):

    Times = TextFile.ReadToTable(ProgramFiles.."\\Project\\Tex t.txt");

    Just out of curiosity, how many "=" signs should I have? Am I just smoking ***** over here or is there something wrong? lol

    Here's the build error with the embedded code:

    ==============================================

    Starting build...
    27-Feb-04 11:46:38 AM
    Project file: D:\AutoPlay Media Studio Projects\Project.am5

    Performing Pre-Build Checks...
    Checking audio settings...
    Checking scripts...

    Syntax Error: [Location="Project:Loop", Event "On FSCommand", Line=7]
    Error Detail: [`=' expected near `Times'] in [Times = TextFile.ReadToTable(ProgramFiles.."\\Project\\Tex t.txt");]
    Checking project settings...
    Checking object settings...

    1 Errors, 0 Warnings
    Build failed.

    ==============================================

    Thanks again!


    Protocol
    "White-colla-AMS-gangsta."
  • Worm
    Indigo Rose Customer
    • Jul 2002
    • 3971

    #2
    I can't tell what's going on. It looks correct to me, butmaybe there is a rogue line of code somewhere above it. Can you post more of a snippet?

    Comment

    • Brett
      Indigo Rose Staff Member
      • Jan 2000
      • 2001

      #3
      Can you provide more code so that I can see the context? It may be the line(s) before or after that code that is causing the problem.

      Comment

      • rhosk
        Indigo Rose Customer
        • Aug 2003
        • 1698

        #4
        Try -

        Times = TextFile.ReadToTable( _ProgramFilesFolder.."\\Project\\Text.txt");

        Edit -
        The line of code is (ProgramFiles is declared/referenced):
        Didn't catch that, sorry.
        Last edited by rhosk; 02-27-2004, 10:27 AM.
        Regards,

        -Ron

        Music | Video | Pictures

        Comment

        • Protocol
          Indigo Rose Customer
          • Oct 2002
          • 423

          #5
          Re: Blah, blah...

          No problem,

          Here's the entire sequence:


          ==============================================

          if (e_FSCommand == "Execute") then
          LoopNumber = 1;
          while (LoopNumber < 7) do
          CurrentDate = System.GetDate(DATE_FMT_US);
          CurrentTime = System.GetTime(TIME_FMT_AMPM);
          CurrentDateTime = CurrentDate.." - " CurrentTime
          Times = TextFile.ReadToTable(ProgramFiles.."\\Reminder Notes\\Times.txt");
          ReminderTime = Table.Remove(Times, LoopNumber);
          if (CurrentTime == ReminderTime) then
          ReminderNumber = TextFile.ReadToString(ProgramFiles.."\\Reminder Notes\\Reminder "..LoopNumber..".txt");
          Paragraph.SetText("Paragraph", Reminder);
          Window.Restore(Application.GetWndHandle());
          Table.Insert(Times, LoopNumber, "X");
          TextFile.WriteFromTable(ProgramFiles.."\\Reminder Notes\\Times.txt", Times, false);
          TextFile.WriteFromTable(ProgramFiles.."\\Reminder Notes\\Reminder "..LoopNumber..".txt", "", false);
          end
          LoopNumber = LoopNumber + 1;
          end
          end

          ==============================================

          I got this to work perfectly yesterday (until the back-up scenario).

          This is the first time I've posted AMS5 code...it doesn't seem to be indenting it, but they're all indented properly of course.

          Thanks again,

          Protocol
          Last edited by Protocol; 02-27-2004, 10:47 AM.
          "White-colla-AMS-gangsta."

          Comment

          • TJ_Tigger
            Indigo Rose Customer
            • Sep 2002
            • 3159

            #6
            It looks like it might be this line

            CurrentDateTime = CurrentDate.." - " CurrentTime

            should be

            CurrentDateTime = CurrentDate.." - " .. CurrentTime
            TJ-Tigger
            "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
            "Draco dormiens nunquam titillandus."
            Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

            Comment

            • Worm
              Indigo Rose Customer
              • Jul 2002
              • 3971

              #7
              CurrentDateTime = CurrentDate .." - " .. CurrentTime

              Comment

              • rhosk
                Indigo Rose Customer
                • Aug 2003
                • 1698

                #8
                Maybe the ";" after the line -

                CurrentDateTime = CurrentDate.." - " CurrentTime
                Regards,

                -Ron

                Music | Video | Pictures

                Comment

                • rhosk
                  Indigo Rose Customer
                  • Aug 2003
                  • 1698

                  #9
                  OK, now that we're all on the same [line] page, LOL!!
                  Regards,

                  -Ron

                  Music | Video | Pictures

                  Comment

                  • Protocol
                    Indigo Rose Customer
                    • Oct 2002
                    • 423

                    #10
                    Doh!

                    Doh!

                    You guys rock! Thanks for being my eyes.

                    *Banging head against proverbial wall* "...Must...remember...to check...code..."

                    lol

                    Protocol
                    "White-colla-AMS-gangsta."

                    Comment

                    • TJ_Tigger
                      Indigo Rose Customer
                      • Sep 2002
                      • 3159

                      #11
                      That was funny. How many people can answer the same question at the same time.?
                      TJ-Tigger
                      "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
                      "Draco dormiens nunquam titillandus."
                      Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

                      Comment

                      Working...
                      X