Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Errors in Direction expression syntax #4011

Closed
oskarkk opened this issue May 18, 2021 · 1 comment
Closed

[Docs] Errors in Direction expression syntax #4011

oskarkk opened this issue May 18, 2021 · 1 comment
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. documentation Related to Skript's official documentation. enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.

Comments

@oskarkk
Copy link
Contributor

oskarkk commented May 18, 2021

Read this:

[%number% [[(block|met(er|re))[s]] [to the]] (north[(-| )][(east|west)][(ward(s|ly)]|er[(n|ly)])] [of]|south[[(-| )][(east|west)][(ward(s|ly)]|er[(n|ly)])] [of]|[(east|west)[(ward(s|ly)]|er[(n|ly)])] [of]|above|over|[(up|down)[ward(s|ly)]]|below|under[neath]|beneath) [%direction%]

In particular:

north[(-| )][(east|west)][(ward(s|ly)]|er[(n|ly)])] [of]
north . [(-| )] . [(east|west)] . [ ( ward(s|ly)] | er[(n|ly)] ) ] . [of]
ward(s|ly)] - missing [, should be ward[(s|ly)]

This is total chaos:
south[[(-| )][(east|west)][(ward(s|ly)]|er[(n|ly)])] [of]
south[ . [(-| )] . [(east|west)] . [( ward(s|ly)] | er[(n|ly)] ) . ] . [of] - let's remove the first left bracket:
south . [(-| )] . [(east|west)] . [( ward(s|ly)] | er[(n|ly)] )] . [of] - now it's like north expression above, let's fix "wardsly" part:
ward(s|ly)] should be ward[(s|ly)], so:
south . [(-| )] . [(east|west)] . [( ward[(s|ly)] | er[(n|ly)] )] . [of]
south[(-| )][(east|west)][(ward[(s|ly)]|er[(n|ly)])] [of]

And:
[(east|west)[(ward(s|ly)]|er[(n|ly)])] [of]
[ . (east|west) . [( ward(s|ly)] | er[(n|ly)] )] . [of] - what's with that first left bracket? let's fix it:
(east|west) . [( ward(s|ly)] | er[(n|ly)] )] . [of] - fix "wardsly" again:
(east|west) . [( ward[(s|ly)] | er[(n|ly)] )] . [of]

And:

[(up|down)[ward(s|ly)]]
(up|down) [ ward[(s|ly)] ]

I've read that the docs are generated automatically, so I think something broke. By the way, that syntax is completely incomprehensible and it would be good to break it into smaller pieces, if that's possible:

[%number% [[(block|met(er|re))[s]] [to the]] north[(-| )][(east|west)][(ward[(s|ly)]|er[(n|ly)])] [of] [%direction%]

[%number% [[(block|met(er|re))[s]] [to the]] south[(-| )][(east|west)][(ward[(s|ly)]|er[(n|ly)])] [of] [%direction%]

[%number% [[(block|met(er|re))[s]] [to the]] (east|west)[(ward[(s|ly)]|er[(n|ly)])] [of] [%direction%]

[%number% [[(block|met(er|re))[s]] [to the]] (above|over|[(up|down)[ward(s|ly)]]|below|under[neath]|beneath) [%direction%]

That's more readable, doesn't it?

@oskarkk
Copy link
Contributor Author

oskarkk commented May 19, 2021

On SkriptHub the syntax is written in a different way:

[%number% [(block|met(er|re))[s]] [to the]] (north[(-| |)(east|west)][(ward(s|ly|)|er(n|ly|))] [of]|south[(-| |)(east|west)][(ward(s|ly|)|er(n|ly|))] [of]|(east|west)[(ward(s|ly|)|er(n|ly|))] [of]|above|over|(up|down)[ward(s|ly|)]|below|under[neath]|beneath) [%direction%]

As you can see, (x|y|) is preferred to [(x|y)], so it's using less chars and it's more readable. The errors which I described above have no place there.

@TPGamesNL TPGamesNL added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: low Issues that are not harmful to the experience but are related to useful changes or additions. enhancement Feature request, an issue about something that could be improved, or a PR improving something. and removed bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. labels May 22, 2021
@TPGamesNL TPGamesNL added the documentation Related to Skript's official documentation. label Jun 15, 2021
AyhamAl-Ali added a commit to AyhamAl-Ali/Skript that referenced this issue Jul 6, 2021
- General Improvements (responsivity)
- Improved mobile view (responsivity)
- Fixed cleanPattern (SkriptLang#4072 SkriptLang#4011)
- Fixed <code> and <pre> fonts
- Fixed ExprAmount Description
- Fixed mobile anchors
@APickledWalrus APickledWalrus added the PR available Issues which have a yet-to-be merged PR resolving it label Jul 16, 2021
@APickledWalrus APickledWalrus added completed The issue has been fully resolved and the change will be in the next Skript update. and removed PR available Issues which have a yet-to-be merged PR resolving it labels Aug 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. documentation Related to Skript's official documentation. enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: low Issues that are not harmful to the experience but are related to useful changes or additions.
Projects
None yet
Development

No branches or pull requests

3 participants