Description
In scripts/scr_dialogue/scr_dialogue.gml, there's a loop with inconsistent loop variables that needs to be fixed:
-for(var ii=1; i<=200; i++){if (obj_ini.role[0,ii]==obj_ini.role[100][eROLE.ChapterMaster]) and (string_count("$",obj_ini.spe[0,ii])>0) then born=true;}
+for(var ii=1; ii<=200; ii++){if (obj_ini.role[0,ii]==obj_ini.role[100][eROLE.ChapterMaster]) and (string_count("$",obj_ini.spe[0,ii])>0) then born=true;}
The loop is initializing variable ii but using i in the condition and increment parts. This will cause the loop to behave unpredictably as it's incrementing the wrong variable.
Context
This issue was identified in PR review #725: #725
Specific comment thread: #725 (comment)
Reproduction
The issue occurs in the function that checks if the Chapter Master has a special marker in their specialization.
Fix
Update the loop to consistently use the same variable (ii) for initialization, condition, and increment.
Description
In
scripts/scr_dialogue/scr_dialogue.gml, there's a loop with inconsistent loop variables that needs to be fixed:The loop is initializing variable
iibut usingiin the condition and increment parts. This will cause the loop to behave unpredictably as it's incrementing the wrong variable.Context
This issue was identified in PR review #725: #725
Specific comment thread: #725 (comment)
Reproduction
The issue occurs in the function that checks if the Chapter Master has a special marker in their specialization.
Fix
Update the loop to consistently use the same variable (
ii) for initialization, condition, and increment.