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

If you use nil as a key when declaring an object, an error will occur. #904

Open
kimpure opened this issue Jan 18, 2025 · 1 comment
Open

Comments

@kimpure
Copy link

kimpure commented Jan 18, 2025

Examples:

Image

But when I declare it like this, it doesn't appear

Image

@Ketasaja
Copy link
Contributor

Your second example is using the string key "nil". For non-string keys, they must be surrounded with brackets, like [nil] = "true", but nil and NaN are the only two values in Luau that are illegal table keys, so it will error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants