Too much recursion error help

Hi Brains Trust. I’m getting a too much recursion error on the random test. (Passes quicktest ok). I know that usually means it’s looping, but I can’t see where. It seems to trigger after line 717 which I’ve pasted the choice sequence from here. Any ideas? :thinking:

Edit- It will loop back to the object label 3 times (it needs to set 4 perameters), but that shouldn’t be enough to set off the randomtest should it?

#Water.
		*if (nsew = "n")  
			*set northobject "water"
			*set nsew "s"
			North is where I will place the Water that falls from the sky to form the deep blue lake of the valley. Cool and malleable, it is the most intuitive and sensitive of the elements. I quiet the emotions causing my heart to beat a fast rhythm, before pouring the liquid from the unstoppered waterskin into a polished obsidian bowl. All forces must be equal here tonight. 
			
			*if (element = "water")
				*set firstplace "yes"
				I whisper a secret word of power and the liquid quivers in response. 
			
			*if (element != "water")			
				I whisper a secret word of power and the liquid ripples uneasily in response.
				*set firstplace "no"
			
			*goto objects
			
		*if (nsew = "s")
			*set southobject "water"
			*set nsew "e"
			South is where I will place the Water that falls from the sky to form the deep blue lake of the valley. Cool and malleable, it is the most intuitive and sensitive of the elements. I quiet the emotions causing my heart to beat a fast rhythm, before pouring the liquid from the unstoppered waterskin into a polished obsidian bowl. All forces must be equal here tonight. 
			
			*if (firstplace = "yes")
				Another whispered word, and the liquid quivers in response. Already there is power stirring beneath my feet.
			*if (firstplace != "yes")
				Another whispered word, and the liquid quivers strangely in response. Power stirs sluggishly beneath my feet.	
			
			*goto objects
			
		*if (nsew = "e")
			*set eastobject "water"
			*set nsew "w"
			East is where I will place the Water that falls from the sky to form the deep blue lake of the valley. Cool and malleable, it is the most intuitive and sensitive of the elements. I quiet the emotions causing my heart to beat a fast rhythm, before pouring the liquid from the unstoppered waterskin into a polished obsidian bowl. All forces must be equal here tonight. 
			
			*if (firstplace = "yes")
				Another whispered word and the liquid quivers in response. Satisfied, I rise once more. 
			*if (firstplace != "yes")
				Another whispered word and the liquid quivers in response. Apprehensive, I rise once more. 
				
			*goto objects
			
		*if (nsew = "w")
			*set westobject "water"
			West is where I will place the Water that falls from the sky to form the deep blue lake of the valley. Cool and malleable, it is the most intuitive and sensitive of the elements. I quiet the emotions causing my heart to beat a fast rhythm, before pouring the liquid from the unstoppered waterskin into a polished obsidian bowl. All forces must be equal here tonight. 
			
			Power sings as I utter the final words of the chant, creating a ghostly image in my mind's eye as it flows around the clearing. 
			
			
			*page_break [i]Quickly now, I must contain the energy and put it to use before it is lost.[/i] 
			
			*goto drawcircle
		

		*goto drawcircle
	
*label drawcircle

Actually, just worked out what it is with that edit thought. I’ll leave it here in case anyone has an issue. It seems that three loop backs IS too many. I added a second label above the first for some of the choices to loop back to instead and no more recursion error.

So yep. Two loop backs maximum it seems.

By the way, does anyone know why the full text no longer works for the random tester? It would have been much easier to find this if I could have seen where it was jamming up at exactly.

1 Like

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.