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

Maybe it might be good to error if there are unknown fields #61

Open
XeroOl opened this issue Feb 11, 2022 · 1 comment
Open

Maybe it might be good to error if there are unknown fields #61

XeroOl opened this issue Feb 11, 2022 · 1 comment
Labels
discussion Ideas that I'm not yet sure about adding, but would like to hear your thoughts on enhancement New feature or request pending Ideas that seem good, but need to be considered implementing

Comments

@XeroOl
Copy link
Owner

XeroOl commented Feb 11, 2022

I'm not sure if I want to make this change or not.

Sometimes, it's possible that a user mistypes a key, or isn't aware of what keys should be present in which modes. For example, let's look at func:

func {0, function() end, plr = 1}

Func doesn't have a player, so plr= is a bad key here. Currently, it's silently ignored, but func could be changed to cause an error.

This has the potential to make it clearer to people what is going on, but it also might not be good style. I'd love some feedback on what the best practices are.

@XeroOl XeroOl changed the title Deny extra keys in calls??? Maybe it might be good to error if there are unknown fields Feb 11, 2022
@NarrikSynthfox
Copy link

I'd say error, but only in edit mode, and let the rest of the code still run as well and provide a variable that can be set if someone wants to ignore the warning if they really want to instead of fixing it, as long as it won't cause any issues when actually playing the file.

@XeroOl XeroOl added enhancement New feature or request question Further information is requested discussion Ideas that I'm not yet sure about adding, but would like to hear your thoughts on and removed question Further information is requested labels Mar 5, 2022
@ChocoboGamer ChocoboGamer added the pending Ideas that seem good, but need to be considered implementing label Sep 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Ideas that I'm not yet sure about adding, but would like to hear your thoughts on enhancement New feature or request pending Ideas that seem good, but need to be considered implementing
Projects
None yet
Development

No branches or pull requests

3 participants