+2 votes

As the title suggests, I'm setting a label's text to the string of an array. The issue is, it includes the brackets in said array. Any fixes? In addition, if anyone is willing to help, how can I convert this array to a list instead?

Godot version 3.4.2
in Engine by (105 points)

1 Answer

0 votes

You can do something like this

var array = ["1", "2", "3"]
var st = ""
for i in array:
    st = st + str(i)

to iterate over an array and add it to a string

by (2,997 points)
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.