Hey. I tried set text from string array. When I tried print string It did work but cant set from array. I dont know why.
here’s my script.
Hey. I tried set text from string array. When I tried print string It did work but cant set from array. I dont know why.
here’s my script.
Did you copy that ‘Set Text’ node from a normal button (i.e. not an editable button)? Because when I drag a line from an editable text box variable and type ‘Set Text’ in the search, the node created reads ‘SetText (Editable Text)’ and NOT ‘SetText (TextBox)’, like yours does.
Try recreating that node.
Can you show us full blueprint ?
I think it’s not about button because it’s work when I use print string. and also I didnt copy set text . thank for your help by the way
First check if your string variable is not empty. Then when foreach loop ends remove oncomplete pin, because there will be mistake. To detect what is the problem just give to set text node static string Like “hello”. if it completes it means problem is in for loop or in array.
Firstly , remove this pin
oh yes. it’s was my mistake . but It doesnt work
thanks trying help
Keep going. Now change Set text node with print string, then take a picture to result and upload here (y)
Let me guess. You want to show all this list together yes?
absolutely
Ok, just to clarify:
By the way, what are you trying to achieve? Because the ‘for loop’ is going to overwrite the string in the editable text box each time (i.e. NOT append them). Are you sure, the last string in that array is valid (in that second image, you’ve got the ‘completed’ pin going into the set text node, that’s going to cause problems).
I think there is one problem You are setting last item from your list and i think it’s empty. So lets do this , declare string variable “all text”. and in this variable append all this array elements. like “all text” = “all text” + array[i]. Use append node good luck (y)
exactly. this is helpful answer . it’s working thank you
Nice , Lastly, check this post solved. Good luck (y)
Can I have a follow up for this question? I also need this result but I need to separate Bus Stop and Pedestrian Area. I need the Bus Stop to be printed below Pedestrian Area. I’m using a textbox and an array to print this. Anyone knows how?