[Solved] Geolocation Showing a lot of numbers.

0 favourites
  • 5 posts
From the Asset Store
The ultimate voice pack filled with 1,536 files of .......wav and mp3 of individual numbers, letters, and words (that go
  • Hello to you all.

    I'm having an issue when using Geolocation: most of the times I get the position with 9 digits: 43.4759862, but sometimes I get a lot of numbers: 43.475898199999996.

    Is there a way to make the result to appear always the same way, with 9 digits?

    I've tried

    But it rounds the number to 40 (Because it's not a "real" decimal number, I guess, I'm not very good with GPS  formats).
    Thanks in advance.
  • ..maybe?..or not?


  • ..maybe?..or not?


    Works perfectly, Thank you very much korbaach !!

    Edit: Just looked for the explanation and found in the manual:

    [quote:6353udw3]left(text, count)

    Return the first count characters of text.

    Not clear at all if you don't know exactly what you're looking for.


    left(text, count) ......count=10

    Return the first 10 characters of text...









    ...but .. 43.475898199999996 its a number... u need to use "str" to convert number 43.475898199999996

    in text "43.475898199999996"

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you for the clarification

    Sorry if I wasn't clear, I understood it once you pointed me to it and then found it in the manual, but I'm pretty sure it will help others.

    I'm starting to learn some coding while I'm not messing with construct 2 (or working) and I already "knew" (I was supposed to, but I forgot, as this post proves) the character's count and remembered it when I saw your line and the manual... But I don't think the manual alone would have been useful for me in this case if I wouldn't know something about the subject already.

    Thank you again!!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)