ClementSparrow / Pattern-Script

Open Source HTML5 Game Engine based on PuzzleScript
20 stars 2 forks source link

Allow nested startloop/endloop structures #12

Open ClementSparrow opened 3 years ago

ClementSparrow commented 3 years ago

I think I needed that feature once.

ClementSparrow commented 2 years ago

Also, @m-ender noticed that the error message in case of nested loops is not very informative. Indeed, we get:

Need to have matching number of 'startLoop' and 'endLoop' loop points.

But PuzzleScript says:

Found a STARTLOOP, but I'm already inside a loop? (Puzzlescript can't nest loops, FWIW). Found an ENDLOOP, but I'm not in a loop?

Which is better. -> Check if that has been added in a recent commit that I did not yet catch up with, or if I broke that.