david-pfx / PuzzleScriptNext

A direct successor to PuzzleScript, building on the work of PuzzleScript Plus, Pattern:Script and others.
http://www.puzzlescriptnext.polyomino.com
MIT License
11 stars 4 forks source link

demo=patt/level - compilation error #65

Closed angilbert closed 1 month ago

angilbert commented 1 month ago

I discovered this by chance. I don't think it's related to any recent fixes or feature/branch development...

Try: https://puzzlescriptnext.polyomino.com/editor.html?demo=patt/level line 180 : You're trying to copy from "WALLDESTROYPATTERN:COUNT:UP" but it's not defined anywhere.

david-pfx commented 1 month ago

An object cannot copy from itself.

angilbert commented 1 month ago

I agree that seems like an odd thing to do. But the pattern:script editor does not throw an error... https://clementsparrow.github.io/Pattern-Script/src/editor.html?hack=ce4a381a60a351841fcd21a34f565342 - so it's another tiny anomaly between the two editors. The intention of the code is to generate a total of 20 sprites using the first 5 (lines 138-178) to generate the remaining 15. It's a bit of a hack, relying on a loophole in P:S design. But you did choose this as one of the PS> "demo" apps - so I assumed you expected it to work.

angilbert commented 1 month ago

Feel free to close this as "not a bug", since you closed the loophole in PS> (which i think is sensible). But as a closed issue it is now visible for anyone else who spots the error.

david-pfx commented 1 month ago

This one is just too hard to figure out how to replace P:S behaviour, for just not enough benefit. So closing as wontfix unless or until someone persuades me otherwise.