+2 votes

My function relies on erasing array element in larger array after recognizing duplications in already instanced nodes. It looks like this :

g.wholeteam.erase([p.filename, p.getnode("Sprite").texture.resourcepath ,p.expbar, p.lvl, p.surname ])

It worked completely fine, until I introduced save/load system. After loading translated wholeteam from JSON, it no longer is able to recognize/compare this content, even when console prints, that all elements being compared are truly identical.... . Find() methods also don't work.

I kept translation simple. Wholeteam is an array containing arrays of only 3 strings and 2 integers. I only deep duplicated it into JSON for save, and than, deep duplicated parse result back. All other elements of game requirring wholeteam array work just fine, so I don't think anything was mistranslated upon loading.

Please help, I am trying to debug it for so long and it looks more and more absurd

Godot version godot 3.2 stable
in Engine by (7,923 points)

1 Answer

+2 votes

Oh my god I have finally discovered it, sometimes You need to ask a question for some gears to move in your head :)

Integers were translated into floats...

by (7,923 points)

Yeah, I think this should be more clear in the documentation. I and others I know have had issues with this lol

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.