Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    I Need Help On My Eye Test Game

    Work In Progress
    2
    12
    458
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • TurtleGamer 0
      TurtleGamer 0 @Kat last edited by

      @kat So basically you want me to change line 90, and after the first question, change num to a new number and make a new word list for question 2? (If that makes sense)

      1 Reply Last reply Reply Quote 0
      • Kat
        Kat Fuze Team last edited by

        @TurtleGamer-0 You won't need a new word list, just the line num = random(50) after the first question, yes :) You'll need to change lines 108 and 110 as well so that it prints and checks the new answer[num].

        TurtleGamer 0 1 Reply Last reply Reply Quote 0
        • TurtleGamer 0
          TurtleGamer 0 @Kat last edited by

          @kat I thiiiiink I did everything you said but if I get it right or wrong it always shows an error message :(

          Kat 1 Reply Last reply Reply Quote 0
          • Kat
            Kat Fuze Team @TurtleGamer 0 last edited by

            @turtlegamer-0 What does the message say?

            TurtleGamer 0 1 Reply Last reply Reply Quote 0
            • TurtleGamer 0
              TurtleGamer 0 @Kat last edited by

              @kat there was an error on line 90 and the error code says: "String index out of bounds. (String index length: 6, index: 17)" I have no idea what it's trying to say 😓

              Kat 1 Reply Last reply Reply Quote 0
              • Kat
                Kat Fuze Team @TurtleGamer 0 last edited by

                @turtlegamer-0 Ah ok, there's something I didn't spot. Both your array of answers and the variable that stores the player's response are both named "answer" and that's giving you the problem. Try changing lines 89 and 90 to say something like

                playerAnswer = input( "What does it say?" )
                if playerAnswer == answer[num] then
                
                TurtleGamer 0 1 Reply Last reply Reply Quote 0
                • TurtleGamer 0
                  TurtleGamer 0 @Kat last edited by

                  @kat Thank you so much! Now my eye test is ready to play! 😁 Here's the NEW ID!
                  ID: VQ173MND1Q

                  Kat 1 Reply Last reply Reply Quote 1
                  • Kat
                    Kat Fuze Team @TurtleGamer 0 last edited by

                    @turtlegamer-0 You're welcome :) Well done, it's a very nice program! Excited to see what you do next!

                    TurtleGamer 0 1 Reply Last reply Reply Quote 0
                    • TurtleGamer 0
                      TurtleGamer 0 @Kat last edited by

                      @kat Wait, I actually think it's not finished. 😢 I've noticed that if you get it right, everything is perfect, but if you get it wrong, it makes you still type it twice. So I did an experiment where I added another question, and if you get it wrong it makes you type it 3 times, so it makes you type it again the same amount of questions that there are... If that makes sense

                      Kat 1 Reply Last reply Reply Quote 0
                      • Kat
                        Kat Fuze Team @TurtleGamer 0 last edited by

                        @turtlegamer-0 Ah, I think I see the problem. The first question doesn't have an else, so if you get it wrong there's no clear() or update() and you keep seeing the same word. To fix it you can copy the whole else section from line 130 to 148 and paste it before the endif on line 105 and it should work properly :)

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post