-
-
Notifications
You must be signed in to change notification settings - Fork 22.5k
Array find and has api don't work when data from json #29513
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
Comments
maybe I save the number , it read back to string ? |
I wrote a custom 'has' api:
|
You should use the ConfigFile class to store user configuration, it's specifically intended for that purpose. JSON can do it, but it's simpler with ConfigFile 😃 |
@Calinou thank you very much <3 |
The problem was probably that any number parsed from JSON is a float and you used find/has with integer. |
@KoBeWi |
Uh oh!
There was an error while loading. Please reload this page.
Godot version:
3.1
OS/device including version:
MacOS, internal runing test
Issue description:
I save config to local with json and load it back next time. I found that the array object can't check unit with "find" or "has" api
Steps to reproduce:
...
Minimal reproduction project:
right code:
wrong code : (always save the same data)
dic defined:
The text was updated successfully, but these errors were encountered: