Comments (1)
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)
- Event-Values in docs HOT 2
- Config option `case-insensitive variables: false` breaks functions HOT 1
- Condition "Event Cancelled" works strangely or not at all HOT 2
- Skript Error that completely breaks the plugin. HOT 3
- Skript does not properly handle scripts in disabled folders. HOT 1
- Manipulating the y (vector expression) of a block throws error HOT 1
- Reload consumes main thread HOT 8
- Make player ride entity SETS passengers, does not ADD them (distinction?) HOT 2
- Add a way to disable block physics (set block at {_loc} to {_type})
- Provide a more meaningful example in ExprElements
- ObjectOpenHashSet not found in Spigot versions 1.17.1 and below
- On Portal Create Interferes with On Portal Enter HOT 1
- When I reload /sk, a torch error occurs. HOT 6
- Add EntityShootBowEvent
- Add PropertyType.SHOULD HOT 4
- Remove message when using %player% in variables HOT 2
- Custom Inventory HOT 1
- Error when closing server HOT 1
- Make the event value prefix enforced by default
- Random class casting? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skript.