Forum

> > CS2D > Scripts > Is it possible to combine 2 variables?
Forums overviewCS2D overview Scripts overviewLog in to reply

English Is it possible to combine 2 variables?

4 replies
To the start Previous 1 Next To the start

old Is it possible to combine 2 variables?

Avo
User Off Offline

Quote
Is it possible to combine 2 string variables?

For example I have :

1
2
text1='Unreal'
text2='Software'

And I want get third variable by combining text1 and text2:
1
text3='UnrealSoftware'

I know I can do it this way when I want use it to show message:

1
parse('say '..text1..''..txt2..'')

But I want do it by other method.

old Re: Is it possible to combine 2 variables?

Anders4000
User Off Offline

Quote
user Avo has written
Is it possible to combine 2 string variables?

For example I have :

1
2
text1='Unreal'
text2='Software'

And I want get third variable by combining text1 and text2:
1
text3='UnrealSoftware'

I know I can do it this way when I want use it to show message:

1
parse('say '..text1..''..txt2..'')

But I want do it by other method.

Yep, guess this would work:
1
text3 = text1..text2

...@user EngiN33R: Damn you

old Re: Is it possible to combine 2 variables?

Apache uwu
User Off Offline

Quote
1
2
3
4
5
6
7
8
function concat(...)
	return table.concat(arg)
end

text1='Unreal'
text2='Software'
text3=concat(text1,text2)
parse(concat('say ',text3))

I don't see the point though lolo~
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview