Randomtest error with input_text variables: infinite loop

Hi :heavy_heart_exclamation:
I’m writing a game and I have a really simple error related with Randomtest. I know why it happens, but I don’t know how to fix it.

The error I’m getting is:

RANDOMTEST FAILED: Error: custompc line 58: visited this line too many times (1000)

My code looks like this:

Code
What is you real name? Don't worry, I won't tell. 
*input_text realname

So you truly are $!{realname} ${realsurname}. Iconic. Now, you must surely hide your real name. After all you've done. After all that has… transpired.

*label whatname
What name do you go for nowadays?
*input_text name

*if (name = realname)
    $!{name}?! You poor thing. Please choose a name DIFFERENT than your actual name.
    *goto whatname

What an common name! $!{name}! Simply perfect!

I know this loop it’s due to Randomtest invariably writing “Blah blah” when presented with an input_text choice. But how could I possibly make Randomtest more creative?!

Is there a way to fix this or will I always be trapped in this silly loop? :pensive:
(the actual problem is that I can’t use Randomtest to catch real errors bc it starts looping every time lol)

Add in code that triggers only when randomtest is running. Give randomtest some generic names and then skip it to the next part of the scene.

*if (choice_randomtest)
  *set realname "Randomtest"
  *set name "Stacy Fakename"
  *goto a_label_that_takes_you_to_the_next_part_of_the_scene
4 Likes

Thank you so much! I didn’t know you could do that! That solved the issue completely.

1 Like

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