I’m having trouble with the quick test. It keeps on saying HT = 0 and failing the multireplace, despite it always being set no matter the choice in the setting scene. I have no problems regarding this in the random test, up until seed 527, where the random test keeps on turning white.
From the error message, it seems like the error is somewhere else. Can you show us what’s on line 11? My guess is the error is caused by a multireplace where the variable has the value of 0.
That doesn’t seem like the right solution. Are you sure that that variable is set through all branches when you reach that point? It looks like random test has found a path where it’s not set. The best approach would be to walk through that use case and see if it’s indeed being set. Otherwise, you might end up with other bugs.
It’s very difficult to figure out all the paths your code can go afterwards. Can you upload your project in it’s current state to a private dashingdon link so we can have a better understanding about what’s going on?
When you *create HT in startup.txt, is it *create HT 0? If so, that can cause problems with multireplace - you could try *create HT 1 or another number instead.
Edit: I see that is what it is in startup - try *create HT 1 and see if that behaves better.
I went through the branches where you set HT. I didn’t see any point where you forgot to set it. Also, you are creating the variable with the value 2 in the startup, which makes the bug even stranger.
My only other guess would be that there is a branch where you can bypass the hair type selection and go directly to chapter 2. You can see if this is the case by running randomtest and going through the choices it made (you can select this option before running it) and then select the choices manually and see if you can reproduce the issue.
Edit:
I tried running your project locally and quicktest passes, however, I get another error when running random test (this happens because you forgot to add a description for the last value of HT):
RANDOMTEST FAILED: Error: startup line 1078: invalid @{} at letter 198; ‘HT’ is equal to 5 but there are only 4 options