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.

B
44
S
12
G
13
Posts: 628
Reputation: 10,471

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
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

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
B
44
S
12
G
13
Posts: 628
Reputation: 10,471


Return to How do I....?

Who is online

Users browsing this forum: Artpunk, Braus, GenkiGenga, Kagubro, Mirlas, Yahoo [Bot], zeneizel and 22 guests