This has been happening a lot in the game I’m currently working on. Can anyone see if I’m doing something wrong? Or is it a bug with the random tester. It seems to get upset if I’m using *if statements with choices within choices and makes me double up on the *goto at the end in order to pass. (Example below.)
Hey that does work. Weird since I’ve basically said the same thing with the if statements, but it does pass without the second goto with an *else. Thanks.
*else should work fine, but also check the values you’re testing.
Right now, in your first example, your two possibilities are *if (voice > 29) and *if (voice < 30), but that doesn’t cover cases where voice = 29 or voice = 30.
In practice, it probably works out that way? But on the most technical level, no. Not at all. It’s more like “29.00000001 or more”.
As above, it probably should be, at least in practice? But technically this would be more like “29.99999999 or less”.
Written like this, there’s some overlap. 29.5, while it may not actually occur during gameplay, would trigger both if it could occur. Maybe randomtest is somehow picking up on that?
Sorry, you’re right that your original code will handle cases where voice = 29 or 30. Not enough coffee here. But I do think the overlap in hypothetical values between 29 and 30 may be what’s triggering the randomtest error.
Yeah you’re probably right. I’m not using fairmath, so that shouldn’t happen but random/quicktest doesn’t know that!
@Amtelope haha that’s fine. It’s 2.30am in the morning here and I suddenly had this horrible feeling I’d mis-coded and entire chapter through lack of sleep
Still not touching on the core of the problem, which is quicktest doesn’t care. It cheats and assumes both sides of all *ifs are possible to both pass and fail to check every line.
Quicktest will come to this line:
*if false
and yes, will even test assume this line is possible to reach and test it.
It will continue to this line:
*if true
and while every real playthrough will stop here…
*finish
…quicktest will still test this line because it runs both sides of every *if.
Quicktest often times produces fall positive bugs. It’s meant to, to prevent other, harder to detect, bugs getting through.