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
45
S
12
G
13
Posts: 628
Reputation: 10,496

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
253
S
86
G
42
Posts: 7,037
Reputation: 59,189

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
45
S
12
G
13
Posts: 628
Reputation: 10,496


Return to How do I....?

Who is online

Users browsing this forum: Kazan, Rudi55 and 2 guests