Randomtest just stopping?

I just tried this, but there doesn’t appear to be any loop. The game continues like it should after making the same choices as randomtest.

Yes. (:

Ok there’s a somewhat easy way to tell if you have an infinite loop.
Put a counter by the problematic text and have it go up by 1 every time.

*set counter +1

The above alone should have no impact on your game whatsoever.
Then, you can do something like

*if counter > 99
 We found the infinite loop.

Again, this only triggers if you reach the same thing beyond whatever number you want.

1 Like

Would this work even if randomtest doesn’t go beyond the choice it stops at? I’m not sure this would work, either, because all the other options are *disable_reuse and therefore can’t be chosen again. So even if I tried the counter in one of those options, it would never work, or at least I don’t think so.

It’s worth a shot if you put the check in at the right spot.
Also dont forget to put the *ending that triggers when the counter is above a certain point.
This will help you narrow down the location.

1 Like

How would I know where the right spot is, though? Just trial and error, you think?

I think you can try that with multireplace too, but you need to show the text for it :confused:
Maybe do this:

*temp loop 0
*label 42qna2c2
*set loop +1
(@{(loop <99) all fine| whoops}
   *disable_reuse #"When do the war games begin?" I ask.
      "From what I know of Lord-Smith Lustre, he's gonna want to start as soon as possible. Probably tomorrow or the day after, I'd bet."
      *goto 42qna2c2
   *disable_reuse #"What do we do, exactly?" I inquire.
      "Heh, now there's the important question! To be honest, even though it really sucks, there's not much we [i]can[/i] do to prepare for these things, given their spontaneity. I'm not a big fan, but you've got to admit it's kinda fun thinking on your feet once in a while!"
      *goto 42qna2c2
   *disable_reuse #"How many people will be 'invading'?" I question.
      "For sure not his whole army, but a decent portion of it. These things are taken pretty seriously."
      *goto 42qna2c2
   #"No more questions," I say.
      "Great! Let's get to thinking, then," he addresses you and Non'Caesura.
      He gets up off of his cot. Sulo explains that all equipment is blunted during the war games to eliminate the possibility of injury or death. They are to be solely a friendly competition in order to test the might of two allies against each other, and last until one side either captures the other's leader/stronghold, successfully repel the invasion, or someone surrenders. Perhaps unfortunately for you, no one ever surrenders.
      *goto 43start
   *if (loop >99) #Yeah we got a loop

note: i’m using plain space instead tabs here.


Well for example with the disable reuse text you posted earlier, another way to do it is to insert a *bug command.

*if not(athlete)
 *if not(brainiac)
  *if not(charmer)
   *if not(skilled)
    *bug The Code Fell Through above label 43a2
1 Like

Tried this but had to fudge the code a little to get it to work. I say “work” because it seems to have went through fine but it still stops at the same choice. ):

Why are you looking at the choice? If it was looping back to the choice it would be displaying the option a bunch. The loop is further down from that.


^ this.

And looking at the text (i’ll check on scrivener in a moment) i think you might have an indent error.


*label 43start
[b]Chapter 4.3: Gild the Lilies[/b]

*if athlete
   You spend the rest of the day outlining your plan of attack (or should I say defense?) in preparation for Amerdale's assault. Ser Aurum seems to be of the opinion that devising intricate battle positions is going to overcomplicate everything, and instead favors a simple line formation tiered around the docks in a crescent. Non'Caesura suggested that you at least build ramparts, and Archidamia reluctantly agreed, as long as they also had sharpened logs embedded within the earth.
   In all honesty, you don't really have a head for this kind of strategic planning. You're strong and you know how to use a weapon, but regardless of how much you may want to contribute to this planning session, anything you could add would most likely be shot-down. So instead, you pay careful attention to the creation of their scheme.
   Construction is set to begin immediately on a curved rampart made of packed dirt, on which archers will be positioned behind a barricade of pointed driftwood stuck into the ground at an angle, facing the water. In front of the rampart, five rows of ten heavy soldiers are to stand ready with spears and greatshields. Then, as one moves closer to the lake, another five rows of ten footsoldiers, and then three more. You, Non'Caesura, and Ser Aurum will be stationed in between the third and fourth rows in order to give you a proper position to both fight and change tactics if the need arises.
   You had best hope that a good offense is indeed the best defense.
   *goto 43a2
*elseif brainiac
   Wiley gets out the miniature version of Fort Guerrison, and the three of you begin to work on your battle strategy. If Amerdale is indeed going to arrive by ship, as it seems, then your efforts should be focused on building a strong wall of defense around the docks area. It already slopes naturally into the lake, so that gives you the advantage of the high ground. Non'Caesura proposes that you erect a rampart in a crescent, whose edges encompass the docks.
   That gives you an idea.
   Thinking quickly, you draw an imaginary rampart with your finger and then place some of the clay figurines behind and in front of it, with the majority of them hidden from view on the safe side of the wall. You then explain your plan: you position enough of your troops in front of the rampart to make it seem like a serious play, but then when Ser Lustre approaches, the reserve soldiers who had been unseen from his perspective rush out and capture him.
   Both Non'Caesura and Wiley nod their heads in agreement.
   *goto 43b2
*elseif charmer
   "What did Emperor Maganat mean when he said you were in charge of 'what we discussed previously'?" asks Non'Caesura. "I am assuming, probably rightfully so, that whichever responsibility you are being given is [i]our[/i] duty as well, no?"
   "Wow, yep! You're good at that, Non'Caesura -- I forgot all about what he said," Sulo responds, perhaps worryingly casually. "Well, when this happens, I usually sit it out and let Commander Aurum worry about planning. I'm not really a 'defense' kinda guy, you see. I can weasel and infiltrate with the best of 'em, but my talents aren't very suited to repelling an invasion force."
   "Do you mean to say that we are simply going to stand around and do nothing, sir?! Why, of all the dastardly, craven things to do!" Non'Caesura huffs.
   Sulo holds his hands half-up in surrender. "Now wait just a minute, I never said we weren't gonna do [i]anything[/i]. Ya'see, Lord-Smith Lustre has a bit of a... theatrical side. You'll see what I mean -- the point is that he gets real into this, and that's where we're gonna come in. Just relax and have fun with it, you guys'll be fine."
   Non'Caesura, frustrated with this non-answer, goes to sulk on his cot. You can't say that you aren't feeling something similar. What, exactly, does Sulo mean by "theatrical"? You suppose there is only one way to find out, and that is to wait.
   *goto 43c2
   Fabricia clears a relatively clutter-free patch on the canvas floor of the tent where the three of you begin to brainstorm. Soon, the area around where you are sitting becomes littered with paper, bits of charcoal, and rubber eraser chunks. Non'Caesura is busy puzzling over a miniature siege tower when one of its bindings breaks loose and a stick rolls underneath one of your sheets of paper. As you lift up the paper to retrieve it, an idea hits you.
   In order to demonstrate, you need the stick to remain where it is. Obviously a little miffed, but still intrigued, Non'Caesura leans closer as you begin to explain your plan to trap the beach.
   "See how the stick lies under the paper, out of sight?" you ask, and cover it. "But when the paper is lifted, it becomes visible again! What if we dug-out pits in the beach and lined them with wood so they didn't collapse. Their tops would be hinged and covered with sand. Then, our soldiers could hide inside while Amerdale and his forces walk onto the beach. And once we give the signal -- BAM! They climb out and hit them with a surprise attack."
   "That, uhh, that could work," Fabricia responds.
   "It would need to be remarkably quick, though, to prevent Ser Lustre's men from simply closing the boxes. And they need to be spacious enough for a few soldiers and their equipment," adds Non'Caesura.
   "We'll use spare shipping containers -- some of those can fit ten adults inside them," you offer.
   "Hmmm... I suppose..." Non'Caesura concedes.
   "Let's, like, get to digging, then!" Fabricia adds.
   *goto 43s2
*label 43a2

This is again with indents instead of tabs. how does it fare?

1 Like

I’m looking at the choice because I can only look at the choice without crashing my browser. I said earlier in the thread that there doesn’t seem to even be a loop, which is why I’m confused. I’ve fixed loops before, but I don’t even know what the problem is, here, so I am at a loss.

I’m getting the same results. ):

Can you check what focus (charmer, skilled etc) the other seeds had?
maybe we can narrow it down like that (as carlos mused i believe)

1 Like

I did some tests where I ran it without the pre-made character options because it seemed like that might be what caused it, but the same thing happened. It is definitely an issue with the charm path, however, as the first seven seeds were like skill, brainpower, athleticism, skill, skill, and eight was the first that used charm.

okay, let’s go bit by bit. What does the NEXT label in that path look like then? if the choice and the bit of intro are fine, it might be there.

1 Like

You might want to copy and paste each chapter (put an *ending on it) into its own text file and test it chapter by chapter.

Edit: Also, it shouldn’t crash your browser (I mean, if you turn on show text; an infinite loop will crash it). Are you using the latest version of choicescript, and what’s your operating system?

1 Like

It looks like this:

*label 43c2
Non'Caesura eventually grows tired of moping and nags Sulo until he finally relents, and the three of you give the docks a cursory inspection to placate your fellow apprentice. It does seem a little odd not to be doing anything, but Sulo probably has a good plan. Probably.

*if mentorlover
	Non'Caesura has overtaken you and Sulo, providing the two of you with a rare moment of quiet to enjoy the other's company. Your love is his usual energetic self, and swings your arm back and forth while you walk back to the tent.
	"It'll be fine, you know? These things have a habit of working themselves out. And after, we'll celebrate a job well done!" he cheers with a bright smile.
	You nod and walk at his side with a spring in your step, infected by his enthusiasm.
	*goto 43c3
*if noncaesuralover
	You and Non'Caesura walk side-by-side, holding hands. He wants to be more affectionate, however, and sometimes sneaks a kiss on your cheek or wraps his arm around your shoulder as you go. Sulo has overtaken you, providing a rare moment of solitude for you to be together as you walk back to the tent.
	"I feel ready to take on the world with you at my side, love," assures Non'Caesura.
	And without needing to say a word, he knows you feel the same way.
	*goto 43c3
	*goto 43c3

This is how the game is set-up already.

Probably not, though I’m not entirely sure how to tell.

Windows 7 home, lol. My laptop is getting to be a dinosaur.

do you have if/if/else at the other labels here too?
try changing the second to elseif and see what happens?

1 Like


I’m getting the same result.

is it possible that both variables might be true for som reason?

1 Like

No; you can only choose either, not both.