I want to run a Quicktest, but when I try, I always get the same error. I know what’s causing it, and will explain below the excerpt of code, but I can’t get rid of the offending lines, so I need to find out some way, like Randomtest’s *if choice_randomtest, to get around it.
See, when the player chooses their name, I need to grab each letter in their chosen name, whether it’s one of the default names or one they input. Each *if statement in the code above stores each letter in the name in a *temp variable. When I first tried doing this, I got errors if the inputted name wasn’t long enough, e.g. the name Helen would result in “There is no character at position 6. “Helen” is only 5 characters long.” Adding the *if statements to check that the letter existed fixed it for manual playthroughs and Randomtests. However, since Quicktest checks *if statements even if they should be impossible to reach, I can’t test past these lines of code. This is right at the beginning of the game as well, so I essentially can’t use Quicktest at all. Help please?
Here’s how I inserted the choice_quicktest bit. If it works the same as choice_randomtest, it should’ve brought the quicktest way further down to past all the stuff where I needed each individual letter, but it stopped at the same place anyway.
*if (choice_quicktest)
*set name "Quickie"
*set arithmancy 7
*goto finally_done
*choice
*if ((gender = "male") or (gender = "neuter")) #Hiroas
*set name "Hiroas"
*goto named
*if (gender = "female") #Hirya
*set name "Hirya"
*goto named
*if (gender = "male") #Belleros
*set name "Belleros"
*goto named
*if ((gender = "female") or (gender = "neuter")) #Philone
*set name "Philone"
*goto named
*if ((gender = "male") or (gender = "neuter")) #Theseus
*set name "Theseus"
*goto named
*if (gender = "female") #Araidne
*set name "Ariadne"
*goto named
*if (gender = "male") #Persefs
*set name "Persefs"
*goto named
*if ((gender = "female") or (gender = "neuter")) #Danae
*set name "Danae"
*goto named
*if ((gender = "male") or (gender = "neuter")) #Dionis
*set name "Dionis"
*goto named
*if (gender = "female") #Semely
*set name "Semely"
*goto named
#New Name
*goto new
*label new
Your name? (Maximum 9 letters, please, and make sure the first letter, and only the first letter, is capitalized.)
*input_text name
Right! So your name is ${name}!
*choice
*allow_reuse #Yes
*goto named
*allow_reuse #No
*goto new
*label named
*if (length(name) >= 1)
*temp letter1 name#1
*if (length(name) >= 2)
*temp letter2 name#2
*if (length(name) >= 3)
*temp letter3 name#3
*if (length(name) >= 4)
*temp letter4 name#4
*if (length(name) >= 5)
*temp letter5 name#5
*if (length(name) >= 6)
*temp letter6 name#6
*if (length(name) >= 7)
*temp letter7 name#7
*if (length(name) >= 8)
*temp letter8 name#8
*if (length(name) >= 9)
*temp letter9 name#9
@Lan@Nocturnal_Stillness
I don’t see how doing anything with the variables will fix it. The problem is that the quicktest is continuing into the *if statement when it shouldn’t.
What is the actual error message you currently get? The one you mentioned about not reading the sixth letter sounded like an issue with the variables itself which is why I suggested creating them as opposed to *temp as I have had quicktest issues with *temp that were fixed by just creating them.
Error: line 158: There is no character at position 7. “Hiroas” is only 6 characters long.
The problem isn’t with the *temp variable, it’s with the name#7 command. name#7 tries to retrieve the 7th letter, but since there is no 7th letter in Hiroas, it returns with an error.
Could you create two different *labels that lead to different places depending on if you choose a name from the list or if you input a name? It seems to me that this might eliminate the problem of one of the list names not having enough characters to pass the same check as the input_text names.
If “passing quicktest” is your only concern, I have a temporary solution: *comment out all your intricate system and add default naming for quicktest to pick. Doesn’t solve your problem entirely, but if you want your game to pass quicktest as submission req, HG can understand that.
Quicktest always create two copy (or more) of their instance when encountering a set of conditional checks. That’s why there’s no reliable way to force it without commenting the lines you don’t want quicktest to test.
As mentioned, there’s no way to get Quicktest to skip lines of code without commenting said lines out. So as long as you have *temp letter9 name#9 in the code, you’re going to get an error anytime Quicktest tests that line and name is eight characters or less.
By using a loop and an array, you can eliminate the statements that give Quicktest problems.
Alternatively, you could just set name to something with nine or more characters when Quicktest is running.
*label named
*if (choice_quicktest)
*set name "123456789"