You just have to keep working to isolate the problem. Either progressively comment out more and more of the code until it passes RT, and then the last bit you commented was the problem, or the opposite: start with an empty project and copy over blocks of code (no text), one by one, until it stops passing RT. It’s grueling, but if nothing else works, this might.
Yeah that’s what I ended up doing. It’s super annoying to have to step by step it down and sometimes it’s a prior setting that’s causing the error so with some errors I can tell where it’s getting upset but not easily why. I haven’t had the random tester be this difficult to deal with ever in one project which is ironic consider how short this game is. (And I’m still just working on single playthroughs, I hate to think what’s going to happen when I start checking loops!)
Turns out there were other bugs in there and I’m still trying to isolate another recursion error in one of the other files and having a heap of trouble as I just can’t work out what its problem is. It’s weird that it seems to be flagging everything as recursion errors when they don’t seem to all that type of error. For example there was another one where I accidentally put *input name instead of *input creaturename which at worst I would have thought should have resulted in an incorrectly displayed spirit name in the text, and another one where under the wrong circumstances might have caused a null selectable error but it was flagging both as recursion errors. It’s kind of weird ![]()
Hey all, just wondering if I can pick the collective’s brains again. Honestly these recursion errors are doing my head in. I’ve been trying to step my way through each section to find where the issue might be, but there’s one (or perhaps 2) in story 3 of Raishall I just can’t find. The weird thing is you can run the randomtester through thousands of times without a problem and it’ll pass, then it’ll find one sometimes thousands of choices in on another seed. There are previous examples where the last few choices are the same, but then it’ll recursion error like this one. I think the error is somewhere in this sequence but I’m returned to it over several days and I still can’t seem to locate it.
I currently have the loops turned off (so that’s not what it is). I don’t think it’s an image issue any more as others are passing. Quick test passes. It goes directly to the ending scene after this.
Code that appears to be getting flagged
(Paststory file)
*fake_choice
#"Too much!" he screams into the wind. "You take too much. Stop!"
*image story3_header.png
[i]"We do not. We only take what we are owed as agreed,"[/i] giggles the hungry voice sounding smug. [i]"You should be careful of what you ask mage."[/i]
#"You must not kill me!" Arum cries. "Remember our deal!"
*image story3_header.png
[i]"Oh, but we remember the contract mage. Better than you it seems."[/i] giggles the hungry voice sounding smug. [i]"We were promised fair recompense. It is our right to collect as agreed."[/i]
"But you take too much!" the man gasps out. "Stop this!"
[i]"We will not,"[/i] another voice whispers almost silkily. [i]"We break no oaths by taking our due. You should be careful to specify what you ask mage."[/i]
#"Let us renegotiate," the mage gasps. "You'll get nothing more if I die here today."
*image story3_header.png
[i]"No,"[/i] a dark voice replies without a hint of hesitation. [i]"We have everything we want right here. You cannot stop us from taking our dues Raishall. You promised. It is too late to go back on your word."{/i]
"But you take too much," Arum cries desperately. "You were only to claim back the energy you expended. You have broken the deal."
[i]"We keep our oaths," a second voice snarls. [i]"It is you who should be more careful of what you ask mage."[/i]
A vision passes unbidden over Arum's eyes. Shadowy magic stretching far beyond the boundaries of their own home. Just how far did this curse extend. Panic takes hold and his heart beats fast much to the delight of the spectres that continue to tear away his essence. This was his death. He had miscalculated and lost.
[i]"You will be a hero will you not? Your people are saved."[i] The voice who had suggested this cursed deal whispers in his mind. [i]"Your kind die all the time for far lesser things. Are you not glad?"[/i]
*page_break
*image story3_header.png
Though the spectre twists the words as if they believes any selfless cause was absurd to die for, ironically the statement steadies Arum's nerve. Of course. Though he may die here today the rest of the village will live. ${rname} will live. And one day he will see them again. Of that he was sure.
Sinking to the ground, heavy droplets of water fall from the sky blanketing the fallen man in a curtain of rain as the shadows slip away from whence they came. He smiles as the world loses focus and turns grey. It is done. He eyelids are heavy. They close one last time.
*goto_scene ending
(Ending file)
*looplimit 1000000000000
*page_break
*check_achievements
*if (storytype = "teacher")
*image story3_header.png
The vision ends, returning you to the present. Perhaps there is yet more to explore?
*if not (choice_achieved_completepaststory)
*achieve completepaststory
*goto endingchoice
This is but one ending in the mists of time. Perhaps you can change your fate?
*if (storytype = "enchanter")
*image story1_header.png
*if not (choice_achieved_enchanterplaythrough)
*achieve enchanterplaythrough
[b][i]A new route opens- Explore what is past.[/b][/i]
*if (storytype != "enchanter")
*image story2_header.png
*if not (choice_achieved_creatureplaythrough)
*achieve creatureplaythrough
[b][i]A new route opens- Explore what lies beyond the veil.[/b][/i]
*label endingchoice
*comment to prevent infinite looping errors on randomtest
*set playthroughnumber +1
*comment *if (playthroughnumber > 3)
*if choice_randomtest
*set playthroughnumber 0
*ending
*page_break Travel back once again?
*goto_scene startstory
This is the second spot where it most frequently seems to flag an error (but again, you can run this game through over 10000 randomtests in some cases without it erroring so it’s really intermittant.
*choice
#"Don't be so glum ${rname}. I've no intention of joining the ancestors today."
*image story3_header.png
${rname}'s expression brightens with hope, bringing on another stab of guilt. Though his statement was not an outright lie, the truth was he may have little choice in final outcome of this day. With flecks with grey already peppering his black hair, he was all too aware that he was considered aged for one of his kind. Few Raishall lived to grow old.
*goto now
#"Have you ever known me to come to harm before? You must not worry yourself. I plan to live to be as old as Charni."
*image story3_header.png
${rname}'s expression takes on an expression of incredulity, as if struggling to imagine ${sherhis} mentor as a wizened hunchback of a man; then a small smile of hope replaces it bringing on another stab of guilt. Though his statement was not an outright lie, he really did intend to do all he could to stay alive, the truth was he may have little choice in final outcome of this day. With flecks with grey already peppering his black hair, he was all too aware that he was already considered aged for one of his kind. Few Raishall lived to grow old.
*goto now
#"You must not worry about me ${rname}, there are greater things than the life of one person."
*image story3_header.png
${rname}'s expression becomes rebellious, refusing to accept that one day he may be taken from ${sherhis} world. Another stab of guilt twists his innards at his student's forlorn expression. $!{sherhis} eyes all but beg for reassurance, but he will not lie to them. Always he has taught, just as he himself was, that the role of a Raishall is to serve. It is dangerous work, few lasted long enough to live to see their students take the reins while they could sit peacefully by the fire in retirement. It was dangerous to harbour such illusions. They make you second guess your duty.
But to see that expression... Had he looked such the day his mentor left and never returned home? Shaking away the image in his mind he changes the subject.
*goto now
*label now
"Come now, I have something for you."
He gestures the child closer gathering up the fallen bones into a ruin etched pouch as ${sshe} steps forward.
"How old are you again? Refresh an old man's memory."
${rname} snorts derisively. "I'm three and ten by the rise of the next full moon as you well know... and you are [i]not[/i] old."
"So you are." Arum hides a grin behind a hand traced with thin pale scars, the question having the desired effect of distracting his charge out of their state of fretfulness. "Well, I think it is past time you have something of mine."
Rising, Arum pads over to a wooden chest which opens with the squeaky creak of poorly oiled hinges. He pulls out a thick book, the yellowed parchment tied with strings of leather and hands it to the waiting ${sgirl}.
*page_break "This is yours now."
*image story3_header.png
His student takes the book gingerly, placing it upon the single wooden table in the corner of the room. Carefully opening the book, ${sshe} flicks though pages drawn with passages of knowledge, illustrations of plants that will heal ills, constellations in the sky, and secret rituals of power. Turning the page again, the parchment is splattered with black ink, sharp teeth and glowing eyes peering out from the darkness. With a muffled squeak, and the child closes the volume hurriedly.
"This belonged to my teacher. And to her mentor before that. Study it well and keep it safe. Perhaps one day you can add pages of wisdom to pass down to a student of your own when the time comes."
His student nods wide eyed, clutching the book to their chest as if it were the most precious object in existence. He sighs wearily for seems like the umpteenth time today, trying to content himself with the thought that at least whatever comes of this day, ${sshe} will not be left completely without guidance.
*page_break
*image story3_header.png
Arum paces over the window, looking out. The morning is already well underway and with no other plan he could not afford to procrastinate much longer. ${rname} joins ${sherhis} mentor, eyes closing as ${she} inhales, face tilted towards the sky.
"It feels wrong. Worse than ever," ${sshe} whispers softly.
*if (selement = "water")
"I start to feel so weak if I pay too much attention to the flow of elements. Like I'm drying up from the inside and being left as no more than a husk."
$!{sshe} shivers, opening ${sherhis} eyes and blinking rapidly as if to dispel the image from ${sherhis} mind. Arum was not surprised. Like himself his student was attuned most to water. The stronger fire became, the more subdued the remainder of elements became. But water due to its contrary nature to fire was by far the most diminished.
For a moment he once again wavers, considering the merits of bringing his student to assist with the task ahead. Though still a novice, the child possessed immense potential. Perhaps more raw power than he himself with all his years of learning behind him. He could use that strength... but no. Endangering himself was one thing. If he lost the one he considered his own child through his actions was another. Even when the stakes were so high, he'd not bring an undertrained ${sgirl} into a ritual such as this one.
*if (selement = "fire")
"The magic grows stronger. I feel like it is trying to burn me from the inside out."
$!{sshe} shivers, opening ${sherhis} eyes and blinking rapidly as if to dispel the image from ${sherhis} mind. Arum was not surprised. Unlike himself his student was attuned to fire, one of the most volatile and difficult to master elements. Thrown out of balance, it subdues the remaining powers of earth, water and air which should be keeping it somewhat stabilised and in check.
For a moment he once again wavers, considering the merits of bringing his student to assist with his task. Though still a novice, the child possessed immense potential. He could use that strength, particularly given their affinity for fire which would balance the spell against his own skill with the flame's antithesis water... but no. Endangering himself was one thing, if he lost the one he considered his own child through his actions was another. Even when the stakes were so high, he'd not bring an undertrained ${sgirl} into a ritual such as this one.
*if (selement = "air")
"The wind feels tainted by fire, as if it is no longer entirely of itself."
$!{sshe} shivers, opening ${sherhis} eyes and blinking rapidly as if to dispel the image from ${sherhis} mind. Arum was not surprised. Unlike himself who specialised in water, his student was attuned to air and messages would be carried on the wind. The stronger fire became the more subdued the remainder of elements became. It seems perhaps even weakened enough to no longer hold the flames in check.
For a moment he once again wavers, considering the merits of bringing his student to assist with his task. Though still a novice, the child possessed immense potential. He could use that strength, particularly given his own affinity to water had caused his talents to weaken under the oppressive, dry heat... but no. Endangering himself was one thing, if he lost the one he considered his own child through his actions was another. Even when the stakes were so high, he'd not bring an undertrained ${sgirl} into a ritual such as this one.
*if (selement = "earth")
"I feel it in the ground beneath my feet. It is as if veins of magma are threading through the earth itself and spreading out to where they should not be."
$!{sshe} shivers, opening ${sherhis} eyes and blinking rapidly as if to dispel the image from ${sherhis} mind. The announcement was concerning. Arum had not realised that things had progressed this far to the point that fire may be not just supressing, but actually tainting at least earth, and possibly air as well. Unlike himself who specialised in water, his student was attuned to the earth and far more sensitive to changes that were occurring within the ground beneath their feet. Still, with something so dire as this he feels he should have known, or at least suspected. It seems that his attunement to water, most weakened by the flames, was hindering him more than he would like to admit.
For a moment he once again wavers, considering the merits of bringing his student to assist with his task. Though still a novice, the child possessed immense potential. He could use that strength, particularly given his own affinity had caused his talents to weaken under the oppressive, dry heat... but no. Endangering himself was one thing, if he lost the one he considered his own child through his actions was another. Even when the stakes were so high, he'd not bring an undertrained ${sgirl} into a ritual such as this one.
*page_break
*image story3_header.png
Decision made, he draws ${rname} into a tight hug.
"All will be well. I know how to fix this. Just stay strong a little longer." He steps away, holding his student at arm's length. "Remain here, the charms places about this house will protect you from harm. You are precious to me, and your mind still not guarded enough to be outside safely on such a day. It is the Autumn equinox as you well know and it is stirring the forces of the world that already are restless under the peculiar conditions you can sense. I will return for you here when it is over."
A hint of rebelliousness borne of concern for his welfare colours ${sherhim} expression, but he knows that long years of strict training under his tutelage would win out and ${sshe} would do as he bade. At least ${sshe} would remain safe. Safe as long as he could repair the damage wreaking havock on the environment outside. The light make it so and send him the power to do what he must.
Gathering up the heavy sack near the doorway, he strides from the room and does not look back.
*page_break
*image story3_header.png
The climb up the hill is exhausting. Even the shade cast by the dying trees of the forest offer little relief. At least he was spared the bites of winged insects seeking blood that should cloud the sky. The heat of the day was too much even for them to leave their hiding places in the deepest shadows. Reaching the sacred clearing marked by a ring of small weather-worn stones, Arum braces himself as he steps out from beneath the branches to be met by the full force of the blazing sun. Dry leaves rustle in the ever present breeze, but eerily not a single bird call could be heard. Any creatures with sense that were able to had already left the dying forests. That or died.
Emptying the last of the tepid water from his canteen into his mouth, he swallows to relieve the parched feeling in his throat. Time to work quickly before heat saps what is left of his strength. First comes a silver dagger, the worn hilt comfortable in his hands. Though plain to untrained eyes this knife had been his for long years, the many rituals it had part of causing the blade to thrum with power beneath his fingertips. Deftly, he slides it beneath the leather belt and reaches into the sack once again. Next from a pocket he retrieves a thick linen pouch dyed as black as the midnight sky. Heavy wards had been woven into the threads, guarding its contents. Carefully that too he tucks into his belt. The tie he leaves knotted. It was unwise to attract the kind of attention he would seek before all was prepared.
Finally, food is stacked by the edge of the clearing beneath the shadow of an old, gnarled tree branch. Dried berries, strips of cured meat, tubers dug from the ground, and most precious of all wilting greens carefully tended and sheltered from the heat. Stunted though the vegetables were, it had taken a huge effort to grow even these meagre leaves. It had taken much to convince the chieftain of the need to commandeer the best of their dwindling supplies, but if the ritual was to be a success they must offer up that which was valuable to them. The spirits he sought to call were fickle, dangerous and always ravenous. Their ilk would suck the world dry of life should the veil ever fail to contain them.
*fake_choice
#He could only hope these merge offerings would be enough to placate those he summoned.
#They would never be satisfied, but perhaps their hunger would drive them to accept all he had to give.
#He feared that the gifts would not please the spirits, but he could do no more now but hope.
*image story3_header.png
[i]And so it begins.[/i]
Full files (I might need to update these, will do so shortly) DashingDon: Free ChoiceScript Game Hosting
What happens when you start randomtest at seed 3273 or seed 4015? Does the recursion error pop up at the end of the ‘first’ seed? ![]()
The error pops up randomly. Say if you set it for seed 1, when it reaches 3273 it might flag the error. Then if you run it again, it might flag it at 4015 instead, or it might pass and flag no errors at all.
I don’t want to muddy the waters so disregard if irrelevant, but what method are you using to try to generate the full text output, and what happens?
Just ticking the box like here.
If I start that, the window just goes blank and the tester doesn’t actually run. (This is the case even for working projects.) I’m using firefox by the way (just in case that’s something I shouldn’t be doing.)
I can get full text via CSIDE, but don’t find that useful for finding where bugs are located as it often lags a bit when printing text for me, and will crash the program and blank the randomtest screen if it hits a problem. (This is apparently a known response for CSIDE to randomtest bugs.) But anyway, the not printing the full text seems to be a problem with the intergrated testing package with the choicescript files.
If you’re on PC, you could try running run-randomtest.bat with the “show full text” and maybe “write output to a file” option? I’ve found that more reliable than the web version.
I don’t know if it’ll affect the recursion error coming up, but it’ll at least be easier to pinpoint what’s going on if the full text generation can work properly.
Thanks! Running the bat file does actually allow me to get a text file from it.
I’m just curious, did that help to pinpoint the error?
Edit: I just copied all your files, but there are two *label randcharacteristics in alternateroute.txt, so I can’t even get it to pass quicktest.
So, I’ve run it though 100,000 random tests twice (as well as a few more 10,000 passes) and it says everything is fine in the “bugged” section I’ve currently been testing when run though the .bat file? Super weird. Either it’s the most irregular error ever or I’m starting to think there’s something wrong with the html version of this test. (Or at least something on my computer isn’t playing nice with it.)
@dfabulich could there be some sort of bug that’s popped up do you think please? (.bat seems to be working, if it’s more than just a my computer thing maybe just needs a recommendation to use that if having issues? Just asking as I spent a lot of time trying to find this error and would hate for others not to know trying the .bat file as a double check for the html one if they can’t track it down
)
Either way, I guess that should be sufficient for you to submit the files to HG. ![]()
Could be an issue with the web browser or html file.
Yep thank goodness
. Surely 200,000 successful passes should indicate the chances of hitting an error are pretty low. Agree I think there’s something going on with the html file or my browser causing the glitch (probably.)
I do need to now see what the loop is going to do to the files but at least the single playthroughs are working correctly. Let’s see what happens
![]()
Edit: Yay randomtest passes on a 10 loop game
Now if I can just not break it again when finishing my edits I’ll be set. Thank you everyone who has been helping me track down the errors in this project!
Sorry about digging up this old thread, but I had a similar problem.
I had attempted to compile my entry for the Spring Thing using the latest version of Choicescript. However, compile.html did not work, it stopped halfway. But run-compile.bat was able to create the compiled file.
I had the same problem using a copy of choicescript downloaded over a month ago. However, compile.html worked fine on a copy of choicescript downloaded last year.
I’m thinking there’s a problem with the .html files, or a problem with the way our browsers handle them, in the latest choicescript releases.
Quite possible. They had to revamp the whole thing a while back to do the upload thing as the tester/compile files stopped working due to updates within the browsers. (Or maybe the lastest version of the choicescript files are just buggy.) It sounds like multiple people are having issues now, not just me. Not sure what to do about it, but thank you for letting me know about the compile issue now as well!
Apologies for bumping this old discussion. However, I felt it would be informational towards any future authors and coders running into the same issue as I have.
I also had an issue with recursion errors on my compiled HTML document. And I found the reason why, completely simple yet easily overlooked; when you are using a *text_image command, you must include the alignment and caption along with the file name. Leaving out the alignment and caption, such as *text_image sample.png , will cause the recursion to occur, as opposed to *text_image sample.png center Sample Caption .
This was an interesting find, although I’m not sure exactly why the recursion gets triggered due to the improper command. Anyways, that was my discovery, hopefully that saves some headaches for anybody in the future that runs into such an issue.





