Twine Version: 2.8.1
Error: <>: exceeded configured maximum loop iterations (1000)
My for loop keeps on repeating itself when it should’ve stopped long before it reached the maximum. It’s even more baffling because it is a copy and paste of another for loop of mine that works perfectly, but this loop doesn’t for some reason. All I did was change two words. I did another copy and paste, changed the same words to something diff, and it works just fine.
<<for _i = 0; _i < $NPC.length; _i++>>
<<if $NPC[_i].role == "deputy">>
$NPC[_i].name $NPC[_i].sname<br>
<<if $NPC[_i].gender == "man">>
He
<<else>>
She
<</if>> has $NPC[_i].haircolor hair.<<if $NPC[_i].mentor == "taken">><br>
<<if $NPC[_i].gender == "man">>
His
<<else>>
Her
<</if>> apprentice is <<for _i = 0; _i < $pfammen.length; _i++>>
<<if $pfammen[_i].role is "deputy">>
$pfamapp[_i].name $pfamapp[_i].sname
<</if>><</for>>
<</if>>
<</if>><</for>>
The thing I changed was the two “deputy” cause it was originally “leader” which works. “doctor” also works. “deputy” isn’t working somehow. It just repeats it endlessly. The output is
Briar Meadows
He has black hair.
His apprentice is Caleb Hills
and then it repeats until it reaches maximum. It’s supposed to just return those three lines, like my other two for loops. There’s only one deputy, one leader, and one doctor NPC too