The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

0 votes

I do not find the conversion of an 'Array' int ', I find for a bool, string or float but not' Array '

Thank you.

in Engine by (27 points)

An int is a single value whereas an Array can contain multiple values. That does not match. You can get the length of an Array with somearray.size() or you can access a single array element by index with i.e. someint = somearray[0]

If I didn't understand you correctly then provide more details.

If you want to convert a String to an Array then you can use the split functions of the String class:

You can convert to string arrays. Godot will implicitly convert the values to integer when used in contexts like calculations (but will run on an error if the value is not a number).

If you want to store/retrieve a number of different values in/from text files then it'd be best to use JSON which allows to parse an entire dictionary with arrays/values/dictionaries from a string or to encode it to a string.

Yes, i look json..

Thank you wombatstampede

Please log in or register to answer this question.

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.