Looplimit error

I’m getting a loop limit error (visited this line too many times).

I think it’s because I’m asking for user input, and RandomTest doesn’t know how to input the “correct” answer (i.e. a word with no more than 4 letters). But maybe I’m missing something? I get the error at the line that reads *label righthand_choice.

My code looks like this:

 #Your tattoo says something else.
      *temp lefthand ""
      *temp righthand ""
      *label righthand_choice
      Your right hand reads:
      *input_text righthand
      *if (length(righthand) >4)
        Please pick a word with less than five letters.
        *goto righthand_choice
      *label lefthand_choice
      Your right hand reads ${righthand} and your left hand reads:
      *input_text lefthand
      *if (length(lefthand) >4)
        Please pick a word with less than five letters.
        *goto lefthand_choice
      *set knuckle_words ("$!!{righthand} "&"and ")&"$!!{lefthand}"
   Your knuckles sport the words ${knuckle_words}.
   It's not your only tattoo, you also have…
   *set pctat_knuckletat true
   *set attribute_conspicuous +1
   *goto fullchoice

You can gate the choice with *if (not(choice_randomtest)) as long as you’ve manually tested the choice in-game and made sure it works as intended.

3 Likes

If that is the issue, you can get around it by adding a specific thing for when you run the test.

*if ((choice_quicktest) or (choice_randomtest))
  *set lefthand "Love"
  *set righthand "Hate"

Then you can redirect it to a point right after the choices have been made. I use that for all my assigned names and other player input.

7 Likes

Apparently, according to other posts in the forum, when randomtest encounters input_text it fills in ‘blah blah.’

3 Likes

I figured something like that was the problem. It makes sense that it doesn’t input something completely random every time.

I’ve tested it and it works as intended. Good to know if(choice_randomtest) is a thing, very useful. Thanks!

1 Like

Thanks! This did the trick. :slight_smile: Yeah I think I’ll encounter more situations like this, so it’s good to know a solution.

1 Like

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.