how do I bypass an error saying that “visited this line too many times” ???
apparently my codes simulates a turn-based combat like suikoden game where two parties fighting and each party has six members at most, so I do understand that there will be lots of looping and reading the same code over and over again
the process itself was fast, but upon reaching certain turns, the error pops out, how can I fix this?
debugging gets harder with more codes and loops, can we implement a new syntax that makes the code enter debugging mode?
like a “breakpoint” on other programming language, it makes debugging faster and focused on certain part of the code, and we can stop clicking “step” one by one because it feels horrible
if many agrees with my suggestion and feel the same problem while debugging, maybe we can push this feature to be implemented?
I am not sure if you are using RandomTest for debugging, so disregard this part is you are - but if not it is essential especially if you have complicated code as you describe. You can use *if (not(choice_randomtest)) to block RandomTest from picking certain choices if you want to focus on a particular path or section.
You can use *looplimit 0 to switch off the limit on infinite loops but that will cause issues when using RandomTest. I would suggest including an option that forces the combat to end, at least for testing purposes, so when playtesting you don’t have to play through the whole section every time and RandomTest can move past the section.
I had to increase looplimit to *looplimit 3000 instead of 1000 in order to get the save system for FH to work, it might be worth trying to just increase it rather than turning it off to see if that gives enough space for the combat to run as intended.
Exactly. The default value is 1000, as that works for most things. However, occasionally it might be too little, and the *looplimit code needs to be added to change it. It will not be there now.
ahem sorry to bug you guys again, where do I put the *looplimit command?
I tried putting it on startup file like this:
it didn’t worked, I changed to *looplimit 0, still didn’t worked, error still popped out
and this is how I do looping in choicescript:
I have no worry about infinite loops because I set the lower and upper limit before do the looping, but this loop limit makes me confused
so, where should I put *looplimit command? or did I loop it the wrong way all this time?
can someone show me the correct looping method and the use of looplimit the way choicescript accepts?
thank you
EDIT: okay I think I found it, I put it here:
I had to set it to 0, because when I set it to 1,000,000,000,000 ( 12 zeros ), the program forcefully exit the subroutine ( the label is a subroutine that gets called over and over again ) midway when reaching 1000 iterations and I don’t know why