Two variables in text box
8 posts • Page 1 of 1
Two variables in text box
I want to have two variables in a text box but it doesn't seem to be working, something like this:
A: {variable1}
B: {variable2}
A: {variable1}
B: {variable2}
Registered: 2008-10-16
-
Ivanlul - Posts: 763
- Joined: Mon Aug 31, 2009 11:19 pm
- Location: US
Re: Two variables in text box
{"" + scene.my.varA + "\n" scene.my.varB}
that will give you varA with varB on a seperate line
that will give you varA with varB on a seperate line
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: Two variables in text box
also, remember that algodoo has the Math.ToString command, able to convert your general value into strings.
Jrv wrote:TC42 wrote:Quite honestly, I didn't think anyone on 4chan has that good a use of grammar, spelling, usage, mechanics, ect.
But I've never been there, so I may be wrong.
GTFO newfgt
-
RA2lover - Posts: 607
- Joined: Mon Aug 31, 2009 8:43 pm
- Location: Brazil
Re: Two variables in text box
You can also use that same funtion in phun!
{"Test: " + scene.my.toString(2 + math.pi)}
{"Test: " + math.toString(2 + math.pi)}
Both of those will give you the same result.
- Code: Select all
scene.my.toString=(N)=>{"" + N}
{"Test: " + scene.my.toString(2 + math.pi)}
{"Test: " + math.toString(2 + math.pi)}
Both of those will give you the same result.
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: Two variables in text box
How can I show two variables in a single text box?
Registered: 2008-10-16
-
Ivanlul - Posts: 763
- Joined: Mon Aug 31, 2009 11:19 pm
- Location: US
Re: Two variables in text box
Did you use what I posted originally?
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: Two variables in text box
Sorry about that. I typed it on my iPod and forgot the last plus.
That should work now. ;D
- Code: Select all
{"" + scene.my.varA + "\n" + scene.my.varB}
That should work now. ;D
-
standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
8 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 9 guests