increpare / PuzzleScript

Open Source HTML5 Puzzle Game Engine
MIT License
903 stars 160 forks source link

Unnecessary error if no gap between + and direction #259

Closed Draknek closed 7 years ago

Draknek commented 10 years ago

http://www.puzzlescript.net/editor.html?hack=0f32a5203248ec5079e8

left [ Player | Crate ] -> [ Player | ] +right [ Player | Crate ] -> [ Player | ]

If there's no space between "+" and "right", it gives this error: The start of a rule must consist of some number of directions (possibly 0), before the first bracket, specifying in what directions to look (with no direction specified, it applies in all four directions). It seems you've just entered "+RIGHT".

It feels weird that this is an error rather than just being accepted.

increpare commented 10 years ago

Agreed. There's no ambiguity here.

On Fri, Oct 3, 2014 at 1:06 AM, Alan Hazelden notifications@github.com wrote:

http://www.puzzlescript.net/editor.html?hack=0f32a5203248ec5079e8

left [ Player | Crate ] -> [ Player | ] +right [ Player | Crate ] -> [ Player | ]

If there's no space between "+" and "right", it gives this error: The start of a rule must consist of some number of directions (possibly 0), before the first bracket, specifying in what directions to look (with no direction specified, it applies in all four directions). It seems you've just entered "+RIGHT".

It feels weird that this is an error rather than just being accepted.

— Reply to this email directly or view it on GitHub https://github.com/increpare/PuzzleScript/issues/259.