convert string "33.4" to number 33.4

Get help using Construct 3!

Post » Tue Aug 01, 2017 5:43 pm

Hello;

Is there some kind of number(string) function that will convert "33.4" to the number 33.4.
If I just set a number variable to the string "33.4" it doesn't work.

Thanks for your time.

yours
winkr7
B
34
S
8
G
3
Posts: 169
Reputation: 3,305

Post » Tue Aug 01, 2017 5:54 pm

float("33.4")
ImageImageImage
B
71
S
22
G
247
Posts: 3,756
Reputation: 137,558

Post » Tue Aug 01, 2017 5:55 pm

Thanks lots.
B
34
S
8
G
3
Posts: 169
Reputation: 3,305

Post » Thu Aug 03, 2017 1:25 am

you can also use int(33.4) and then to go back str(whatever int)
B
4
S
1
Posts: 7
Reputation: 314


Return to How do I...?

Who is online

Users browsing this forum: No registered users and 0 guests