convert a string into value

Get help using Construct 2

Post » Tue Nov 08, 2011 6:41 pm

Hi,

I'm new here, and I'm a new user of construct2.
I would like to convert a string from an editbox into a value in order to make simple calculations.

I know how to convert a value to a string with STR but not the inverse.
Thanks for helping.

Passionate developer

If my work helped you to make your project, please consider making a donation :)
B
44
S
12
G
14
Posts: 631
Reputation: 10,987

Post » Tue Nov 08, 2011 6:44 pm

Use the int() expression:
int(Text.text) for an integerKyatric2011-11-08 18:45:11
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
294
S
117
G
96
Posts: 7,313
Reputation: 71,094

Post » Tue Nov 08, 2011 6:57 pm

thanks a lot.
I tried float() as well. But works only with ".", not ","
It's not a problem, but is there a solution to recognize "," as a dot ?
thanks.septeven2011-11-08 18:57:54
Passionate developer

If my work helped you to make your project, please consider making a donation :)
B
44
S
12
G
14
Posts: 631
Reputation: 10,987


Return to How do I....?

Who is online

Users browsing this forum: DiegoSanudoDT and 11 guests