GithubHelp home page GithubHelp logo

Comments (1)

sovdeeth avatar sovdeeth commented on September 24, 2024

I really don't think this should error. Users should be responsible for checking the validity of their arguments, so checking if arg-3 is set is a perfectly valid way to handle this. Erroring here would lock users out of existing command structures that they may have been using for a while (and I certainly do), for no real reason in my opinion. A warning may make sense for certain types, like player, where their parsing depends on factors outside of the command, but this certainly isn't the case for all parameters. This warning would also require a config option to switch off, as the user may have many valid reasons for putting a non-text argument after a text argument.

For example, should this have a warning/error?

command persona <action:text> [<persona:text>] [to <player>] [with colour <text>]:

I have a non-text after a text, but it's hardly in danger of causing parsing issues.

To sum up, I think this is a very small benefit for a lot of arduous effort avoiding edge cases and false positives, plus going as far as to error would start causing breaking changes and limit the functionality of Skript commands for no good reason.

If anything, I'd rather see a stricter parsing of text arguments, limiting them to one word or a series of words inside quotes, similar to how Brigadier handles basic string arguments.

from skript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.