Could you clarify what you expect/desire to happen in this test vs. what actually happens? A good bug has all three components: steps to reproduce, expected behavior, and actual behavior.
As I read the sample, the sample is indeed buggy code. Randomtest will catch the bug, but you can find the bug yourself manually just by playing the game.
To reproduce: Open the sample game in a browser. Select either option, then click “Next Chapter.”
Actual: After you click “Next Chapter,” the game fails with an error message, “gosubtest line 2: invalid return; we’ve already returned from the last gosub”
Expected: At the end of the final.txt
scene, there should be an ending menu (Play Again, Share this game, etc.)
You can reproduce this bug with randomtest, too.
*****Seed 0
startup *choice 9#2 (line 13) #Reload this page.
RANDOMTEST FAILED: Error: gosubtest line 2: invalid return; gosub has not yet been called
Fixing the bug in the sample is straightforward: change the *finish
at the end of final.txt
into an *ending
command. That fixes randomtest and fixes the bug in your browser.
Does any of this have anything to do with your international13
problem? It’s hard to say, without knowing your intended expected vs. actual behavior in the sample.
EDIT: Ohhhhh, I get it. The sample you posted as-is is buggy, but if you remove gosubtest
from *scene_list
, you’d expect all tests to succeed, but instead, quicktest fails, and that is a bug in quicktest. I just fixed it in the latest version of ChoiceScript up on github!
If you upgrade, start with your sample, and remove gosubtest
from *scene_list
, the game works fine in the browser and passes randomtest and quicktest, but quicktest gives you a warning:
final line 2: WARNING there is no next scene; *finish will end game. Use *ending instead.
It’s a good warning! Be sure to use *ending
when you mean to end the game; don’t just *finish
and rely on that to end the story.
Thanks for your patience and your help reproducing the issue.