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,506

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
262
S
93
G
55
Posts: 7,150
Reputation: 67,069

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,506


Return to How do I....?

Who is online

Users browsing this forum: 20170217, bulugia, pelife123, Zathan and 6 guests