Trying to collect split strings to form a whole string.

I have a “message variable” which generates two or more sentences one after another, I’m fetching these data from the server. I want to collect all the sentences from the “message variable”, to form a single whole sentence, and add it to “Full Conversation”. I did a method using for each loop but was unsuccessful. Can anyone help me how to achieve that. Is this the right way ?

Eg :
I have these strings.

hello!
Good Morning!
(which collects the data one after another from the server)-> Present in “Message variable”

Now i want to combine these strings to form a whole string.
Eg :
hello! Good Morning! → I want to add this sentence to the “Full Conversation variable”.


The print string displays the output as

hello!
Good Morning!

Instead of

hello! Good Morning!

You’re setting ‘full conversation’ to each string in the array, and then printing that last one.

You need to concatenate as you’re going along :slight_smile:

This didn’t work out how i wanted it to be.

When i ask a new question. The previously provided answer will also be visible. And it also generates 3 to 4 times.

How do I check that messages are stored in the array here(Conversation array), Whenever i ask a question!
Screenshot 2024-02-10 163744

1 Like

Well, you can add them, just like you are already.

Am I missing something?

Is there any way so that I can implement the same. without the help of conversation array? From message variable directly to Full Conversation?

Ok, if you clear the conversation first, then it might be ok

Otherwise, I would recommend watching a lot of vids and trying again. People who know what they’re doing spend months on good conversation systems :slight_smile: