How to do this?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • ronwilliams
    Forum Member
    • Jun 2008
    • 248

    How to do this?

    x = 2
    EveryThreeLines = {};
    for I = 1, Table.Count(StudentFolders), (x * 20) do
    table.insert(EveryThreeLines, Entries[I]);

    Student1 = Entries[{""..x.."1"}] ------I want to have Student1 = Entries[21]

    , but Student1 = Entries[{""..x.."1"}] won't work!

    Please help
    Thanks Ron
  • Imagine Programming
    Indigo Rose Customer
    • Apr 2007
    • 4247

    #2
    What is it what you are trying to do?
    Your question is a bit unclear to me.
    Bas Groothedde
    Imagine Programming :: Blog

    AMS8 Plugins
    IMXLH Compiler

    Comment

    • ronwilliams
      Forum Member
      • Jun 2008
      • 248

      #3
      I want this:
      Student1 = Entries[21]

      I have this, but does not work:
      x = 2
      Student1 = Entries[{""..x.."1"}]

      Am I using the the x and 1 wrong?

      Comment

      • Imagine Programming
        Indigo Rose Customer
        • Apr 2007
        • 4247

        #4
        Why don't you just use Entries[21]; ?

        This is another way, but I'm still not sure what
        you are trying to achieve.

        Code:
        local x = 2;
        Student1 = Entries(tonumber(tostring(x)..tostring(1))];
        Bas Groothedde
        Imagine Programming :: Blog

        AMS8 Plugins
        IMXLH Compiler

        Comment

        • ronwilliams
          Forum Member
          • Jun 2008
          • 248

          #5
          Thanks, but I still have no idea how to use this?
          local x = 2;
          Student1 = Entries(String.ToNumber(tostring(x)..tostring(1))];

          Comment

          • jassing
            Indigo Rose Customer
            • Jan 2001
            • 3124

            #6
            Ron, I think you're making this more difficult than it needs to be:

            x = 2
            Student1 = Entries[String.ToNumber(x.."1")]

            Comment

            • Imagine Programming
              Indigo Rose Customer
              • Apr 2007
              • 4247

              #7
              Also, I had a syntax error in my code ^^
              I blame it on the fact I don't know what you are trying to achieve :yes
              Bas Groothedde
              Imagine Programming :: Blog

              AMS8 Plugins
              IMXLH Compiler

              Comment

              • mwreyf1
                Indigo Rose Customer
                • Aug 2004
                • 417

                #8
                Good excuse, Image

                Comment

                • Imagine Programming
                  Indigo Rose Customer
                  • Apr 2007
                  • 4247

                  #9
                  Originally posted by mwreyf1 View Post
                  Good excuse, Image
                  Not really is it... I tend to blame everything on something else these days,
                  I really shouldn't do that. But I love it :yes
                  Bas Groothedde
                  Imagine Programming :: Blog

                  AMS8 Plugins
                  IMXLH Compiler

                  Comment

                  Working...
                  X