MV Merging two or more variables

Hi^^
I have three variables (let's say x, y and z).
Every variable contains a string.

x= "Hello"
y = "world"
z = "!"

How can I merge these three vars into one?

w = "Hello world!"
w = x + y


but it depends on the code, different functions might have a different approach,
specially how the code is written and how it is readed in general.

the above solution works, but it can also (depending on coding: w = (x+y)
or even w = "x" + "y". as far I know it.
w = x + y


but it depends on the code, different functions might have a different approach,
specially how the code is written and how it is readed in general.

the above solution works, but it can also (depending on coding: w = (x+y)
or even w = "x" + "y". as far I know it.

$gameVariables.setValue(w, ($gameVariables.value(x)+$gameVariables.value(y)))

Oh, yeah! That works! Thanks!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/merging-two-or-more-variables.133363/